Solution (source code)

= Solution

The unit binary separation and unit <mean motion> imply through <Kepler third law> that
$$
\mu_1+\mu_2=1.
$$
The <centre of mass> conditions put $M_1$ at $x_1=-\mu_2$ and $M_2$ at $x_2=\mu_1$. Therefore
$$
\boxed{r_1=\sqrt{(x+\mu_2)^2+y^2+z^2},
\qquad
r_2=\sqrt{(x-\mu_1)^2+y^2+z^2}}.
$$