Solution for the problem is:
Total momentum before collision is always equal to total
momentum after collision. So note that:
Momentum of car A = 5000 x Xm/s
Momentum of car A + B = 15,000 x 2m/s
So combining the two, will give us the equation:
15,000/5,000 = 3
3 x 2 =6m/s