A ray starts at $(0, k)$.
A circle has the equation $x^2 + y^2 = r^2$.
I need to find a "tangent point" $(x, y)$ where the ray intersects the circle only once (is tangent to the circle), given $k$ and $r$.
Every ray has 2 "tangent points", I only need to find 1.
I can't solve the system $x^2 + y^2 = r^2 \wedge ax + b = y$ because I don't know the coefficients $a$ and $b$ of the line equation. Calculating them involves 2 points, the ray start and the "tangent point", which I don't know the coordinate.
You know that the tangent line is of the form $y = ax+k$ because the point $(0,k)$ is on the line. You want to find $a$.
You know that $r^2 = x^2 + y^2 = x^2 + (ax+k)^2$. This is a degree two polynomial in $x$. If the line is tangent to the circle, then it should have a single solution. So its discriminant $\Delta$ is zero. Write down the equation $\Delta = 0$, this will give you the value of $a$ depending on $k$ and $r$. Once you have $a$, you can find the point of intersection.