Calculating angle between points on the a circle and on a line at the current angle of the circle Image example of the problem
EDIT (ANWSER IS FOUND):
Thanks to everybody providing anwsers.
After the initial anwser provided my chronos I realized that I only have to calculate the point where the 2 tangent lines on the circle cross (waypoint) and then the distance from that point to the aircraft.
The solution was eventually rather simple:
Distance = Radius * Tan(Angledifference / 2);

ORIGINAL QUESTION
Hello everybody,
Sorry for making this long post with what may be a very foolish question but I tried to work it out for several hours now and the solution is not coming to me :D)
Im currently making an Air Traffic Controller game and I need some help.
A part of this game will be that aircraft automatically proceed to a waypoint and follow a given track after this point. But I cannot manage to figure out the math.
I included a picture to make more clear what I mean.
My goal is to calculate the distance to the waypoint where the aircraft should start its turn to end exactly at the given track after the waypoint.
In situation 1 the aircraft is coming from north (on heading 180 / south), and it will turn left to a heading of 090 (east).
To end at this line it should start its turn when the distance is equal to the turnradius of the aircraft. The circle is representing the turnradius.
In situation 2 the aircraft is on heading 135 (south-east) and it will intercept the same track)
From trial and error I found out that Y = (1 - Cos(headingdifference or angle)) * radius.
But the problem is I can only use Y if the intercepting track is 090 or 270. So I need to calculate the distance to the waypoint (A) to make it work for every heading.
Thank you very much in advance to anyone who is nice enough to invest his time in this math-idiot.

Let $P$ be the point where the plane starts to turn left and let $W$ be the waypoint. Draw a horizontal line to the right of $P$ and draw a vertical line above $W$ until they make a $90^\circ$ intersection at a point. Call this point $X$. Notice that in the right triangle $\Delta PXW$, we have that $\angle P = \theta$ and $Y = XW$ and $A = PW$. It follows that:
$$
\sin \theta = \frac{Y}{A} \iff A = \frac{Y}{\sin\theta} = \boxed{\left(\frac{1 - \cos\theta}{\sin\theta}\right) \cdot R}
$$
