The equation of a circle with center C=(h,k) and radius r is:
(x-h)^2+(y-k)^2=r^2
In this case the center is the point C=(a,b)=(h,k)→h=a, k=b, then:
(x-a)^2+(y-b)^2=r^2
We can apply the Pythagorean Theorem to find the distance between any point of the circle P=(x,y) and the Center C=(a,b). This distance must be equal to the radius of the circle:
A^2+B^2=C^2, where A and B are the legs of the triangle and C is the hypothenuse.
In this case, according with the figure: The legs of the triangle are:
A=x-a
B=y-b
And the hypothnuse C=r
Then replacing in the Pythagorean Theorem:
(x-a)^2+(y-b)^2=r^2
Equal to the equation of the circle (x-a)^2+(y-b)^2=r^2