Answer
14000 kg.
Work Step by Step
The momentum in the horizontal direction will be conserved. Let the positive direction be the direction in which the boxcar was originally moving.
$$(7700 kg)(14 m/s) + (M)(0 m/s) = (7700 kg + M)(5.0 m/s)$$
Solve for M=14000 kg, rounded to 2 significant figures.