Let the two masses m1 and m2 be placed on the X-axis.
It is given that:
m1 = 10 kg
m2 = 20 kg
The first mass is displaced by a distance of 2 cm.
As the position of the centre of mass remains unchanged,
Xcm = 0
Therefore, to keep the position of centre of mass unchanged, the block of mass 20 kg should be moved by a distance of 1 cm, towards left.