Momentum is a vector quantity. That means, it has components as does velocity. So you need to total up the momentum in each direction before, then after. It has to be the same before as after in each direction.
At the same time, assuming an elastic collision, you need to conserve energy. So before you have kinetic energy of m1. After you have a different kinetic energy for m1, and a new one for m2. The before and after need to be equal.
So you will get an x-direction momentum equation, a y-direction momentum equation, and an energy conservation equation. These will involve the magnitude of the after-velocity of each mass (two unknowns) and the two angles.
Here's a hint. Start in the center of momentum frame. In that frame the two masses start with equal-but-opposite momentum. And they finish with equal-but-opposite momentum at some other angle. Then get your final answer and transform back to the lab frame.