The initial momentum of the system can be expressed as,
The final momentum of the system can be expressed as,
According to conservation of momentum,
Plug in the known expressions,
Substitute the known values,
Thus, the final velocity of wagon is -1.18 m/s where negative indicates that the wagon moves in the opposite direction.