Angle between tangent on circle and a line to a point on a larger concentric circle I have two concentric circles, the smaller one has radius $r$ and the larger one radius $r+a$. I am trying to calculate the angle between the tangent line at a point $A$ on the smaller circle and the line from point $A$ to point a $B$ on the larger circle. I made this diagram to illustrate my problem.

The angle I want to find is angle $\beta$.
Distances $a$ (between $B$ and $D$), $d$ (along the circumference of the inner circle), and $r$ are known. With this information, I can calculate angles $\alpha$, $\delta$, and distance $b$, angles $\epsilon$ and $\theta$, as well as the supplementary angles $\delta'$ and $\theta'$ (not drawn to avoid clutter).
Intuitively I see that triangles $ABD$ and $ABE$ are now fully defined but I am not able to work out angles $\beta$ and $\eta$.
How do I solve this problem? I want to code this problem with single-precision floating-point numbers in C++ so a computationally efficient solution is preferred.
EDIT: In this example point $B$ lies "above the horizon" as seen from point $A$. Is it also possible to calculate angle $\beta$ when $B$ is below the horizon?

Assuming that point B always lies on the opposite side of the tangent line from the center C, this is a triangle problem of type SSS where all three sides are known.
To solve a an angle $\alpha$ of the triangle one uses the appropriate version of the Law of Cosines
$$\cos\alpha=\frac{b^2+c^2-a^2}{2bc}$$
In this case,  we have
$$ \cos(\angle CAB)=\frac{r^2+f^2-(r+a)^2}{2rf}$$
and to find angle $\beta$ we subtract away a right angle.
$$ \beta=\angle CAB-90^\circ$$
The angle $\eta$ can be found in a similar fashion, using the Law of Cosines.
