How do I solve this? I need this done asap

In an uniform gravitational field the center of gravity is equal to center of mass of a mass distribution. The center of mass of a colinear discrete mass distribution is given by:
[tex]x_{cm}=\frac{1}{M}\sum ^N_{i\mathop=1}m_ix_i[/tex]where M is the total mass of the system, m_i the mass of each particle and xi is its position. In this case we have:
[tex]undefined[/tex]