You want $5-4\cos (\theta-\phi) = R^2 - 2Rr\cos (\theta-\phi) + r^2$, that is, $R^2 + r^2 = 5$ and $2Rr = 4$. That makes $(R+r)^2 = R^2 + r^2 + 2Rr = 5+4 = 9$ and $(R-r)^2 = R^2+r^2-2Rr = 5-4 = 1$, so $R+r = 3$ and $R-r = 1$.
Further, it might be helpful to consider
$$e^{\cos \theta} \cos (\sin\theta) = \operatorname{Re} \left(e^{\cos\theta}(\cos(\sin\theta) + i\sin(\sin\theta))\right).$$