Let the required circle be (x−h)2+(y−k)2=r2. It passes through the origin and makes intercepts a on the x-axis and b on the y-axis, so it also passes through (a,0) and (0,b).
h2+k2=r2(1)
(a−h)2+k2=r2(2)
h2+(b−k)2=r2(3)
Subtract (1) from (2).
a2−2ah=0
Since a=0, we get h=2a.
Subtract (1) from (3).
b2−2bk=0
Since b=0, we get k=2b.
From (1),
r2=4a2+4b2
The equation of the circle is
(x−2a)2+(y−2b)2=4a2+4b2
x2−ax+4a2+y2−by+4b2=4a2+4b2
x2+y2−ax−by=0
Hence, the equation of the circle is x2+y2−ax−by=0.