How to find coordinates of tangent point on circle, given center coordinates, radius, and end point of tangent line
The point at which the tangent line touches the circle (call it $A$), the endpoint of the tangent line (call it $B$), and the center of the circle (call it $C$) form a right triangle. We know the radius of the circle (length of $AC$) and the distance from the center of the circle to the endpoint of the tangent line (length of $BC$).
All that remains is to use the Pythagorean theorem and a bit of trigonometry to find the length of the remaining side, as well as the angle between the remaining side ($AB$) and side $BC$. That should be enough information to find the coordinates of point $A$.
You do not actually need trigonometry. Let $AC = r$ be the radius, let point $A$ be at $(x_1, y_1)$, and point $B$ be at $(x_2, y_2)$. You know the values of $r, x_2$, and $y_2$.
First find the length of $AB$ using Pythagoras. Then using the distance formula (Pythagoras again) and squaring both sides, $(y_2 - y_1)^2 + (x_2 - x_1)^2 = AB^2$.
In addition, $(x_1, y_1)$ must lie on the circle, so $x_1^2 + y_1^2 = r^2$. Solving these two equations will give you $x_1, y_1$ in terms of the other variables. There will be two solutions, but you can plot each of them and determine which one is correct for the general setup.