(a) Initial energy of body of capacitance $4\ \mu F$ is
$U_{i} = \frac{1}{2} \times \left( 4 \times 10^{- 6} \right)(80)^{2} = 0.0128J$
Final potential on this body after connection is
$V = \frac{4 \times 80 + 6 \times 30}{4 + 6} = 50V.$ So final energy on it
$U_{f} = \frac{1}{2} \times 4 \times 10^{- 6}(50)^{2} = 0.005\ J$
Energy lost by this body $= U_{i} - U_{f} = 7.8\ mJ$