The initial potential energy is calculated using the formula:
\[ U_i = \frac{1}{4\pi\varepsilon_0 a} \left( q_1 q_2 + q_2 q_3 + q_3 q_1 \right) \]
Substituting the given values:
\[ U_i = \frac{1}{4\pi\varepsilon_0 \cdot 0.2} \left[ (-2)(-1) + (-1)(5) + (5)(-2) \right] \times 10^{-18} \]
\[ = \frac{1}{4\pi\varepsilon_0 \cdot 0.2} \cdot (-13 \times 10^{-18}) \]
\[ = 9 \times 10^9 \cdot \frac{-13 \times 10^{-18}}{0.2} = -5.85 \times 10^{-7} \, \text{J} \]
The new distance between charges, measured from the midpoints, is \( a/2 = 0.1 \, \text{m} \).
\[ U_f = \frac{1}{4\pi\varepsilon_0 \cdot 0.1} \cdot (-13 \times 10^{-18}) \]
\[ = 9 \times 10^9 \cdot \frac{-13 \times 10^{-18}}{0.1} = -11.7 \times 10^{-7} \, \text{J} \]
The work done is determined by the change in potential energy, using the formula \( W = U_f - U_i \):
\[ W = (-11.7 \times 10^{-7}) - (-5.85 \times 10^{-7}) = -5.85 \times 10^{-7} \, \text{J} \]
Total Work Done: \( W = -5.85 \times 10^{-7} \, \text{J} \)