Solution (source code)

= Solution

For the negative test <electric charge>, use the same change in the fixed <point charge>'s <electric potential>:
$$
\boxed{W_{-}=(-q)\,[\phi(d)-\phi(2d)]=-\frac{k_eq^2}{2d}=-\frac{q^2}{8\pi\epsilon_0d}.}
$$
The external agent extracts <energy>, since the final <Coulomb potential energy> is lower. Again the path must avoid the fixed <point charge>, and the <work> done by the <electric field> is $-W_{-}$.