How do I solve the following trigonometric equations for $\alpha$ and $\beta$:
$$ x = d\cos(\alpha + \beta)+h\cos(\alpha) $$ $$ y = d\sin(\alpha + \beta)+h\sin(\alpha) $$
My attempt:
Use:
$$ \sin(\alpha+\beta) = \sin(\alpha)\cos(\beta)+\cos(\alpha)\sin(\beta)$$ $$ \cos(\alpha+\beta) = \cos(\alpha)\cos(\beta)-\sin(\alpha)\sin(\beta)$$
So:
$$ x = d\cos(\alpha + \beta)+h\cos(\alpha) \implies d(\cos(\alpha)\cos(\beta)-\sin(\alpha)\sin(\beta))+h\cos(\alpha)=x$$ $$ y = d\sin(\alpha + \beta)+h\sin(\alpha) \implies d(\sin(\alpha)\cos(\beta)+\cos(\alpha)\sin(\beta))+h\sin(\alpha) = y$$
Solve the first equation for $\beta$:
$$\frac{x-h\cos(\alpha)}{d} = \cos(\alpha)\cos(\beta)-\sin(\alpha)\sin(\beta) \implies ??\text{ (I'm stuck here) }$$
I would be very grateful for any hints about how to continue from there.
Mathematica finds that one of the solutions is:
$\alpha = \frac{h x \left(-d^2+h^2+x^2+y^2\right)-\sqrt{-h^2 y^2 \left((d-h)^2-x^2-y^2\right) \left((d+h)^2-x^2-y^2\right)}}{h^2 \left(x^2+y^2\right)}$
and
$\beta = \tan ^{-1}\left(\frac{-d^2-h^2+x^2+y^2}{2 d h}\right)$.