Let the mass of 2500 kg car be
and it's velocity be
and the mass of 1500 kg car be
and it's velocity be
.
After the bumping the mass be M and it's velocity be V.
By law of conservation of momentum we have
![m_1v_1+m_2v_2 = MV](https://img.qammunity.org/2019/formulas/physics/middle-school/sp8e8g29qr85fyvatui4rx1r92drcipcfh.png)
2500 * 5 + 1500 * 1=4000 * V
V = 14000/4000 = 7/2 = 3.5 m/s
So the velocity of the two-car train = 3.5 m/s