The general equation of a circle is (x-h)^2+(y-k)^2=r^2, where r=radius and (h,k) is the centre.
We know the circle passes through two points so we substitute the coords in the equation:
(3-h)^2+k^2=(1-h)^2+(k-2)^2; 9-6h+h^2+k^2=1-2h+h^2+k^2-4k+4; 9-6h=1-2h-4k+4.
4=4h-4k, h-k=1, k=h-1.
But we also know the point (3,0) is tangential to the circle so the radius has an x-coord of 3 because the radius is at right angles to the tangent. But h is the x coord of the centre so h=3 and k must therefore be 2.
So now we have (x-3)^2+(y-2)^2=r^2. Plug in the point (3,0): 4=r^2 (radius=2).
(x-3)^2+(y-2)^2=4 is the equation. We get the same result if we plug in (1,2): 4=r^2.