The correct answer is (b) 2R
To elaborate: Distance between first and last sphere = R + 2R + R = 4R
Since the spheres are identical and lie in a straight line, the centre of mass will lie exactly in the middle.
Hence the centre of mass lies at a distance of 2R from the centre of the first sphere.