rewrite the line as:
Now substiture this for in the equation of the circle:
which simplifies down to:
Now that the line is a tangent to the circle means that there is only one
point where they meet which corresponds to a double root of the quadratic.
The quadratic has a double root when the discriminant is zero, ie:
which is a quadratic in . This has roots ,
and as must be positive the root we require is .
So the equation of the circle is: