There is a messy but easy solution. I will change notation to a more standard form.

Let be the external point. (you called this (x_1,y_1)).

Let be the center of the circle. (you called this (x,y)).

Let be the point of tangentany . (you called this (x_2,y_2)).

AND

.

Solve for

BTW: