The total momentum before collision is
14.0 kg•m/s + (-9.00 kg•m/s) = 5.00 kg•m/s
If v is the velocity of ball B after colliding with ball A, the total momentum after collision is
(2.00 kg) (-5.00 m/s) + (3.00 kg) v
Momentum is conserved, so these quantities are equal. Solve for v :
5.00 kg•m/s = (2.00 kg) (-5.0 m/s) + (3.00 kg) v
5.00 kg•m/s = -10.0 kg•m/s + (3.00 kg) v
15.0 kg•m/s = (3.00 kg) v
v = (15.0 kg•m/s) / (3.00 kg) = 5.00 m/s