Answer
The moment M of the system about the origin is
$$
M=\sum_{i=1}^{2} m_{i} x_{i}=330
$$
The center of mass of the system is
$$
\begin{aligned}
\overline{x} &=M / m\\
&=\frac{M}{ \sum_{i=1}^{2} m_{i}} \\
&=22
\end{aligned}
$$
Work Step by Step
The moment M of the system about the origin is
$$
M=\sum_{i=1}^{2} m_{i} x_{i}=m_{1} x_{1}+m_{2} x_{2}=6 \cdot 10+9 \cdot 30=330
$$
The center of mass of the system is
$$
\begin{aligned}
\overline{x} &=M / m\\
&=\frac{M}{ \sum_{i=1}^{2} m_{i}} \\
&=\frac{M}{ m_{1} +m_{2} } \\
&=\frac{M}{ 6 +9 } \\
&=\frac{330}{15}\\
&=22
\end{aligned}
$$