planet earth is orbiting the sun with angular frequency w,and radius r1.

the moon,which is orbiting the earth with the same angular frequency w(in planet earth's frame) and radius r2.

and together they are orbiting the sun.

now I need to describe the position vector of the moon as a function of time,in sun's frame.

here's my thoughts about this:

I assume that at time t=0 the angle between all the planets is zero.

the speed of the moon in the sun's frame is 2w.

now after a time t,the angle between the moon and the earth is: wt.

and the angle between the earth and the sun is also wt.

now I cant seem to connect all these things.

thanks for your help