The circle's standard equation is (x + f)^2 + (y + g)^2 = f^2 + g^2 - c ==> this is the circle with center (-f,-g) and radius sqrt(f^2 + g^2 - c).

Now use some geometry: draw a circle and a point exterior to it and draw:

== the line joining the point and the circle's center and

== the point and one of the two tangency point on the circle (this is just one of the two tangents determined by the point and the circle) and

== the radius to the tangency point chosen.

You get a straight angle triangle whose straight angle is between the tangent and the radius (this is a basic theorem in geometry) ==> the distance you're looking for is the length of the catetus formed by the point and the tangency point ==> by Pythagoras theorem, this distance squared equals the square distance between the point and the circle's center minus the square of the radius.

Well, now just do the maths.

Tonio