The following instructions are my idea.
P=mv
1. notice that the to masses move in opposite directions -> one has positive and one has negative speed
2. P1=4(-4)=-16[kgm/s]
P2=38=24[kgm/s]
3. Add the momentums:
P1+P2=-16+24=8[kgm/s]
The total momentum of mass equals 8 kg*m/s