Answer
$m_1=m_2=1kg$
Work Step by Step
As given by the exercise, before and after the collision, the component of the total momentum parallel to the floor remains zero, so $\sum p=0$, so this component of total momentum is conserved.
We have $$\vec{p_1}+\vec{p_2}+\vec{p_3}=\sum p=0 (1)$$
$\vec{p_1}=m_1\vec{v_1}=m_1\Big[(-3\sin25)i+(3\cos25)j\Big]=m_1(-1.27i+2.72j)$
$\vec{p_2}=m_2\vec{v_2}=m_2\Big[(1.79\cos45)i+(1.79\sin25)j\Big]=m_2(1.27i+1.27j)$
$\vec{p_3}=m_3\vec{v_3}=(1.3)\times(-3.07j)=-3.99j$
From (1), we would have:
$-1.27m_1+1.27m_2=0$ or $m_2-m_1=0$
$2.72m_1+1.27m_2-3.99=0$
Solving these equations, we find out $m_1=m_2=1kg$