Answer
The horizontal distance between the center of container 1 and the center of mass is $~~26~mm$
Work Step by Step
After 20 grams of sugar is transferred from container 1 to container 2, the mass of container 1 is 480 grams and the mass of container 2 is 520 grams.
Let the center of container 1 be located at $x = 0$
Then the center of container 2 is located at $x = 50~mm$
We can find the x-coordinate of the center of mass:
$x_{com} = \frac{(480~g)(0)+(520~g)(50~mm)}{480~g+520~g}$
$x_{com} = 26~mm$
The horizontal distance between the center of container 1 and the center of mass is $~~26~mm$