Answer
The work done to replace A is negative.
Work Step by Step
We can find the gravitational potential energy of the three-particle system:
$U_3 = -\frac{G~m_B~m_C}{r_{BC}}-\frac{G~m_B~m_D}{r_{BD}}-\frac{G~m_C~m_D}{r_{CD}}$
$U_3 = -\frac{(6.67\times 10^{-11}~N~m^2/kg^2)~(35~kg)~(200~kg)}{0.80~m}-\frac{(6.67\times 10^{-11}~N~m^2/kg^2)~(35~kg)~(50~kg)}{0.40~m}-\frac{(6.67\times 10^{-11}~N~m^2/kg^2)~(200~kg)~(50~kg)}{1.20~m}$
$U_3 = -1.4\times 10^{-6}~J$
We can write an expression for the gravitational potential energy of the four-particle system when A is put back in place:
$U_4 = U_3-\frac{G~m_A~m_B}{r_{AB}}-\frac{G~m_A~m_C}{r_{AC}}-\frac{G~m_A~m_D}{r_{AD}}$
Suppose we begin with a three-particle system and then replace A in the system. We can find the change in gravitational potential energy:
$\Delta U = U_4-U_3$
$\Delta U = (U_3-\frac{G~m_A~m_B}{r_{AB}}-\frac{G~m_A~m_C}{r_{AC}}-\frac{G~m_A~m_D}{r_{AD}})-(U_3)$
$\Delta U = -\frac{G~m_A~m_B}{r_{AB}}-\frac{G~m_A~m_C}{r_{AC}}-\frac{G~m_A~m_D}{r_{AD}}$
We can see that $~~\Delta U \lt 0$
Since $~~Work = \Delta U,~~$ the work done to replace A is negative.