Two masses, mA = 20.00 kg and mB= 12.00 kg, are 50.00 m apart. Find the location of the center of mass of the two masses, relative to mass A.

The centre of gravity is located at a point such that the product of mass multiplied by the distance to the C.G. is equal, namely:

Let x = distance from mA, then
50-x = distance from mB.

mA*x = mB(50-x)
solve for x, and hence 50-x.