Let m1 and m2 be the two masses, whereby m1 is the one that stops upon collision (assuming an elastic collision). We use the conservation of the momentum for this situation, namely the total momentum of the two moving masses is conserved and equal the momentum of the mass2 after the collision:
[tex]m_1\overline{v_1}+m_2\overline{v_2}= m_2\overline{v}[/tex]
From this we can determine the resulting velocity:
[tex]\overline{v} = \frac{m_1}{m_2}\overline{v_1}+\overline{v_2}[/tex]
Which answers the question for general values of m1, m2, v1, and v2.
For instance, if m1=m2, and v1=v2=1 m/s then the resulting velocity of the mass2 would be sqrt(2) m/s in the direction of 45 degrees from its original path.