Answer:
For the first situation, we first need to find the mass of the second train car.
In order to do that, we apply the conservation of the amount of movement:
![515*7.5+m2*0=(m1+m2)*4.8](https://img.qammunity.org/2020/formulas/physics/college/xrw69aefeok24cpxwpoh84dits2xzborxa.png)
and we have as a result:
m2 = 289.6875
For the second situation, also we will apply the conservation of the amount of movement:
![515*7.5-289.6875*6 = (515+289.6875)*V](https://img.qammunity.org/2020/formulas/physics/college/vd533vvy788gnenwq1swlpni6fww6q1ts5.png)
and we have as a result:
V = 2.64 (it is moving to the right)