CCMoveTo to target on a moving object

Hi,

I have an object A and I need it to move it to object B that is already moving from one place to another.

When I use CCMove to move object A to wards b. At the time of calling CCMove the B is on a position, towards A start moving but when B reaches to A, the A’s position have been changed.

is there any best way to do it?

thanks in advance