Consider the figure given above. Suppose the centre of mass of the tray is a distance x1 above the origin and that of the ice is a distance x2 above the origin. The height of the centre of mass of the ice-tray system is:
x=mx2+Mx1m+M
When the ice melts, the water of mass m spreads on the surface of the tray. As the tray is large, the height of water is negligible. The centre of mass of the water is then on the surface of the tray and is at a distance (x2−L2) above the origin. The new centre of mass of the ice-tray system will be at the height
x′=m(x2−L2)+Mx1m+M
The shift in the centre of mass = x−x′=mL2(m+M)