A vector pointing from the sun to the planet is
$$\vec{p(t)}=R(\cos(t\theta)\vec i+\sin(t\theta)\vec j).$$
The vector pointing from the planet to the moon is
$$\vec {m(t)}=r(\cos(t\theta+\phi)\vec i+\sin(t\theta+\phi)\vec j).$$
That is, the moon orbits the planet with the same angular speed and with a phase shift $\phi.$
The sum of these vectors points from the sun to the moon:
$$\vec{p(t)}+\vec{m(t)}=(R\cos(\theta t)+r\cos(\theta t+\phi))\vec i+(R\sin(\theta t)+r\sin(\theta t+\phi))\vec j.$$
In order to check if the moon orbits about the sun along a circle, let's take the squares of the $x$ and the $y$ coordinates.
For the $x$ coordinate:
$$(R\cos(\theta t)+r\cos(\theta t+\phi))^2=R^2\cos^2(\theta t)+2Rr\cos(\theta t)\cos(\theta t+\phi)+r^2\cos^2(\theta t+\phi).$$
For the $y$ coordinate
$$(R\sin(\theta t)+r\sin(\theta t+\phi))^2=R^2\sin^2(\theta t)+2Rr\sin(\theta t)\sin(\theta t+\phi)+r^2\sin^2(\theta t+\phi).$$
And the sum of the squares of the coordinates
$$x^2+y^2=R^2+r^2+2Rr(\cos(\theta t)\cos(\theta t+\phi)+\sin(\theta t)\sin(\theta t+\phi)).$$
I claim that the multiplier of $2Rr$ depends only on $\phi$. Indeed
$$\cos(\theta t)\cos(\theta t+\phi)=\cos(\theta t)(\cos(\theta t)\cos(\phi)-\sin(\theta t)\sin(\phi))=$$
$$=\cos^2(\theta t)\cos(\phi)-\cos(\theta t)\sin(\theta t)\sin(\phi)$$
and
$$\sin(\theta t)\sin(\theta t+\phi)=\sin(\theta t)(\sin(\theta t)\cos(\phi)+\cos(\theta t)\cos(\phi))=$$$$=\sin^2(\theta t)\cos(\phi)+\sin(\theta t)\cos(\theta t)\sin(\phi).$$
The sum of the two terms above is
$$\cos(\phi).$$
So,
$$x^2+y^2=R^2+r^2+2Rr\cos(\phi).$$
Which is the equation of a circle with radius $\sqrt{R^2+r^2+2Rr\cos(\phi).}$ If the phase is $0$ then the radius is exactly $R+r$.