Finding the equation of the sphere that passes through a circle and a point The problem is the following:
I am given a circle by the equations $$x^2+y^2+z^2+2ax+2by+2cz+d=0, Ax+By+Cz+D=0$$ (The first equation is a sphere, the second one a plane, so as I understand the plane cuts the sphere so we get a circle). I have to find the equation of a sphere that passes through the given circle and contains the point $(x_0;y_0;z_0)$, which does not belong to the given plane.
The answer is $$(Ax_0+By_0+Cz_0+D)(x^2+y^2+z^2+2ax+2by+2cz+d)-(x_0^2+y_0^2+z_0^2+2ax_0+2by_0+2cz_0+d)(Ax+By+Cz+D)=0$$
I don't understand how this can be the answer. Why do we have to pug in that point then subtract? I tried rewriting the equation of the given sphere so that I can find the center and the radius, but nothing happened. Could you please give me some hints or methods to approach this problem?
Thank you very much!
 A: Consider the circumference $\mathcal C$ of equations
\begin{cases}
x^2+y^2+z^2+2ax+2by+2cz+d=0 &\\
Ax+By+Cz+D=0
\end{cases}
A sphere containing $\mathcal C$ is therefore $\mathcal S_1$ of equation $x^2+y^2+z^2+2ax+2by+2cz+d=0$.
Any other sphere $\mathcal S$ containing $\mathcal C$ must have an equation of the form:
$$x^2+y^2+z^2+2a'x+2b'y+2c'z+d'=0 \tag 1$$
such that
$$\scriptstyle x^2+y^2+z^2+2a'x+2b'y+2c'z+d'-(x^2+y^2+z^2+2ax+2by+2cz+d)
=\lambda (Ax+By+Cz+D) \tag 2\\
$$ where $\lambda \in \Bbb R$.
If, for example, we want to determine the sphere containing $\mathcal C$ and passing through $P_0 = (x_0, y_0, z_0)$ we must choose $λ$ such that the assigned point satisfies the
$$x^2+y^2+z^2+2ax+2by+2cz+d-\lambda (Ax+By+Cz+D)=0$$
A: HINT:
The idea is: any solution of the system
$$f=0\\
g=0$$
is also a solution of $f+ \lambda g =0$ for any $\lambda$. So now consider the sphere
of equation
$$x^2 + y^2 +z^2 + 2 a x + 2 b y + 2 c z + d + \lambda(A x + B y + C z + D)=0$$
that passes through the point $(x_0, y_0, z_0)$. $\lambda$ can be easily obtained now.
