The general equation of a circle is $$x^{2}+y^{2}+2gx+2fy+c=0$$ with
• centre $$(-g,\,-f)$$ • radius $$R=\sqrt{g^{2}+f^{2}-c}$$
Because the circle passes through the origin $$(0,0)$$, substituting $$x=0,\,y=0$$ gives $$c=0$$.
Hence every valid option must have the constant term $$0$$, which is true for all four choices.
For each option, find the centre, radius and the perpendicular distance to the line $$y=8$$.
The circle will be tangent to the line only when
$$\text{distance from centre to line } y=8 = \text{radius}$$
Case A:
Equation $$x^{2}+y^{2}-6x-6y=0$$ gives $$2g=-6\Rightarrow g=-3$$, $$2f=-6\Rightarrow f=-3$$.
Centre $$(3,3)$$, radius $$R=\sqrt{(-3)^{2}+(-3)^{2}}=\sqrt{18}=3\sqrt{2}$$.
Distance to $$y=8$$ is $$|8-3|=5$$. Since $$5\neq 3\sqrt{2}$$, not tangent.
Case B:
Equation $$x^{2}+y^{2}-8x-6y=0$$ gives $$2g=-8\Rightarrow g=-4$$, $$2f=-6\Rightarrow f=-3$$.
Centre $$(4,3)$$, radius $$R=\sqrt{(-4)^{2}+(-3)^{2}}=\sqrt{25}=5$$.
Distance to $$y=8$$ is $$|8-3|=5$$, which equals the radius. Hence the circle is tangent to the line.
Case C:
Equation $$x^{2}+y^{2}-6x-8y=0$$ gives centre $$(3,4)$$ and radius $$R=\sqrt{(-3)^{2}+(-4)^{2}}=5$$.
Distance to $$y=8$$ is $$|8-4|=4$$. Here $$4\neq5$$, so not tangent.
Case D:
Equation $$x^{2}+y^{2}-10x-6y=0$$ gives centre $$(5,3)$$ and radius $$R=\sqrt{(-5)^{2}+(-3)^{2}}=\sqrt{34}$$.
Distance to $$y=8$$ is $$|8-3|=5$$. Since $$5\neq\sqrt{34}$$, not tangent.
Only Case B satisfies both conditions: passes through the origin and is tangent to the line $$y=8$$ with radius $$5$$.
Therefore, the required equation of the circle is:
Option B which is: $$x^{2}+y^{2}-8x-6y=0$$