The parametric formula for an epicycloid is: $$x=(R+r)·\cos(θ)-r·\cos\Biggl(θ\biggl(1+\frac{R}{r}\biggr)\Biggr)\\ y=(R+r)·\sin(θ)-r·\sin\Biggl(θ\biggl(1+\frac{R}{r}\biggr)\Biggr)$$
The angle θ is the angle between the positive x-axis and a line running from the origin through the center of the generating circle (with radius r).
If instead of the angle $\theta$, you are given the angle between the positive x-axis and the end of the curve (we will call this angle $\beta$), how do I find $\theta$?
$$β = \arctan\frac{(R+r)·\sin(θ)-r·\sin\Biggl(θ\biggl(1+\frac{R}{r}\biggr)\Biggr)}{(R+r)·\cos(θ)-r·\cos\Biggl(θ\biggl(1+\frac{R}{r}\biggr)\Biggr)}$$
Define $t=1+\frac R r$ to make the equation $$\beta=\tan ^{-1}\left(\frac{t \sin (\theta )-\sin (t\,\theta )}{t \cos (\theta )-\cos (t\,\theta)}\right)$$
If $\beta$ is small, composing Taylor series, you would have $$\beta=\frac{ t (t+1)}{6} \theta ^3+O\left(\theta ^5\right)$$ and then an estimate of $\theta$.
Otherwise, I suppose that a numerical method (such as Newton) would be required.
Let us try with $R=2r$, that is to say $t=3$ and suppose $\beta=1$; this would give $\theta_0=\frac{1}{\sqrt[3]{2}}$ and the iterates would be
$$\left( \begin{array}{cc} n & \theta_n \\ 0 & 0.793700526 \\ 1 & 1.229465478 \\ 2 & 1.185508561 \\ 3 & 1.185309641 \\ 4 & 1.185309636 \end{array} \right)$$
Edit
We could have a better approximation using the simplest Padé approximant; this would give $$\beta=\frac{10t (t+1)\, \theta ^3 }{60+3(t^2+10t+1)\, \theta ^2 }$$ and then a cubic equation. For the worked example, this would give $\theta_0 \approx 1.29716$.