Answer
The mass of the heavier block is 15.1 kg.
The mass of the lighter block is 6.9 kg
Work Step by Step
Let $m_1$ be the mass of the heavier block.
Let $m_2$ be the mass of the lighter block.
Note that $m_2 = 22.0~kg-m_1$
Let $U_1 = 0$
$K_1+U_1 = K_2+U_2$
$0+0= \frac{1}{2}(m_1+m_2)v^2-m_1gh+m_2gh$
$0= \frac{1}{2}(m_1+m_2)v^2-m_1gh+(22.0~kg)gh - m_1gh$
$2m_1gh = \frac{1}{2}(m_1+m_2)v^2+(22.0~kg)gh$
$m_1 = \frac{\frac{1}{2}(m_1+m_2)v^2+(22.0~kg)gh}{2gh}$
$m_1 = \frac{\frac{1}{2}(22.0~kg)(3.00~m/s)^2+(22.0~kg)(9.80~m/s^2)(1.20~m)}{(2)(9.80~m/s^2)(1.20~m)}$
$m_1 = 15.1~kg$
The mass of the heavier block is 15.1 kg. The mass of the lighter block is 22.0 kg - 15.1 kg, which is 6.9 kg