Solution (source code)

= Solution

At a point $(0,0,z)$, the two particles are at equal distance $\sqrt{a^2+z^2}$. Their force components in the rotating $xy$-plane cancel, while their $z$-components add. Hence a particle initially moving along the $z$-axis remains on it, and
$$
m_3\ddot z
=-\frac{km_3mz}{(a^2+z^2)^{3/2}}
-\frac{km_3mz}{(a^2+z^2)^{3/2}}.
$$
Cancelling $m_3$ gives
$$
\boxed{\ddot z=-\frac{2mkz}{(z^2+a^2)^{3/2}}}.
$$