I would do it like this:

Let be a point on the line (in this case, also let it be the center of our circle).

Thus, the equation would be

WLOG, let r be the distance from to :

So now it follows that .

Now, if we plug in the other point, we have

.

Simplifying, we have

Recall that is on the line .

Thus,

Therefore, .

Therefore, the center of the circle is and the equation now becomes

Does this make sense?