Given:
The mass of the railroad car is M.
The mass of the man is m.
The car recoils with a speed v, backwards on the rails.
Let the man of mass m approaches towards the engine with a velocity v' w.r.t the engine.
∴ The velocity of man w.r.t earth is v' − v, towards right.