There are three ways to do this that depend on what you have done in class.
1) The motion of the center of mass must be the same before and after the collision
2) The vector sum of the momenta of the incoming masses equals the momentum of joined masses after the collision
These are equivalent and can be solved using cosine law to find sum of momentum vectors or algebra/trig decomposition and adding of the momentum vectors
3) The easiest way is to assume that the problem designer wrote the problem correctly and you can solve this problem doing a momentum balance in just x or just y:
m1v1x + m2v2x = (m1 + m2)v12x where v12 is the velocity after the collision with 1 and 2 stuck together (The only unknown is m2 and you can solve for it.
In order to find the x components you need to transform the headings to math angle, θ, so that you can use the equation mv1x = mv1cosθ
12: 27°S of E is -27 1. 12° N of E is 12 2. 52º S of W is -128 or 232°
You know everything else.