Answer
The speed of the five-car train is 2.0 m/s
Work Step by Step
We can find the initial momentum of the system consisting of the five train cars. Let $M$ be the mass of each train car.
$p_0 = 3M(2.0~m/s)+M(4.0~m/s)+ M(0)$
$p_0 = (10M)~N~s$
We can use conservation of momentum to find the final speed $v_f$ of the five cars when they are moving together.
$p_f = p_0$
$(5M)~v_f = (10M)~N~s$
$v_f = 2.0~m/s$
The speed of the five-car train is 2.0 m/s.