the total self-energy of the 8 smaller spheres is
8x−3G(M8)25(R2)
=−3GM28x×2(5R)
=−3GM24x×1(5R)
=−3GM2(20R)
The work done is the increase in potential
enenrgy which is
−3GM2(20R)−(−3GM2(5R))
=3GM2(5R)−−3GM2(20R)
=(3GM2(R))(15−120)
=(3GM2(R))(320)
=3GM2(R)20