Solution (source code)

= Solution

Let the smaller charge be $q$ at $\mathbf a$ and the other charge be $-Q$ at $\mathbf b$, where $0<q<Q$; an overall sign reversal changes no zero-potential locus. Put $\lambda=q/Q\in(0,1)$. The <electrostatic potential> vanishes exactly when $|\mathbf x-\mathbf a|=\lambda|\mathbf x-\mathbf b|$. Completing the square gives the <Apollonius sphere>
$$
\boxed{|\mathbf x-\mathbf c|^2=R^2,\qquad \mathbf c=\frac{\mathbf a-\lambda^2\mathbf b}{1-\lambda^2},\quad R=\frac{\lambda|\mathbf a-\mathbf b|}{1-\lambda^2}.}
$$
The distances from its center to the charge positions are $|\mathbf c-\mathbf a|=\lambda R<R$ and $|\mathbf c-\mathbf b|=R/\lambda>R$. Thus it encloses exactly the charge of smaller magnitude. Unequal magnitudes are essential: the equal-magnitude case instead gives the perpendicular bisector plane.