I have one math problem which I'm trying to solve. I know it could be done but I'm a little bit "rusty" with my algebra. I'm kindly asking for help.
Problem and procedure of my solution are shown in attached image. I'm trying to find general solution for line equation (points $1$ and $2$ lie on this line) which is tangent to circle with radius $R$ and center point in $(0,a)$. Length $L$ of line from point $1$ to point $2$ is also known.
Basically I'm searching for coordinates of points $1$ and $2$ with $y_2=0$. I think that for $L>a$ there should be 4 possible solutions. I'm only interested in one which has $x_1>0$ and $x_2>0$.
I have $4$ equations, which should be enough for solving this system, but it gets complicated. Maybe someone has some pointers or is there an easier way to do it?