I just want to ask if I was planning to go to someone and in the same minute he show up what is the suitable thing to say? Is it I was going to you? Thank you..
You would simply say
I was just going to see you.
using "just" indicates in the same moment they arrived. If someone calls you that you were about to call, you would say
I was just about to call you.
but you need to mention what you were about to do.
You could also say
I was just about to go to you.
Any of these could work:
I was just going to try and find you!
I was just leaving to go look for you.
I was on my way to come see you.
I was about to head your way.
(several other variants might work fine, too)
Let's say that you have asked a friend who is very good at math for help with a calculus problem. It is your intention to stop by her library carrel, since you don't want to inconvenience her by also asking her to come to you. But she shows up at your library carrel. Then you might say,
Thanks so much for dropping by. I was going to come to you. I didn't mean for you to have to come to me.
going and coming are usually deictic, expressing the speaker's point of view, but that point-of-view can be reversed in situations where politeness and deference come into play, for example.