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:

and we have as a result:
m2 = 289.6875
For the second situation, also we will apply the conservation of the amount of movement:

and we have as a result:
V = 2.64 (it is moving to the right)