Given the point $(0,0)$, Equation of the circle through that point is $c = 0$

Given the point $(a,0)$, Equation of the circle through that point is $a^2+2ga+c = 0 $

$\Rightarrow a^2+2ag = 0 \rightarrow a (a+2g) = 0 \rightarrow g = -\large\frac{a}{2}$

Given the point $(0,b)$, Equation of the circle through that point is $b^2+2fb+c = 0 $

$\Rightarrow b^2+2fb = 0 \rightarrow b (b+2f) = 0 \rightarrow f = -\large\frac{b}{2}$

We know that the centre of the circle = $(-g, -f) = (\large\frac{a}{2}$$.\large\frac{b}{2}$$)$