Momentum is conserved, so
(2 kg) (50 m/s) + (4 kg) (-25 m/s) = (2 kg) v₁' + (4 kg) v₂'
where v₁' and v₂' are the velocities of the two blocks after the collision. Simplifying this gives
100 kg•m/s - 100 kg•m/s = (2 kg) v₁' + (4 kg) v₂'
0 = (2 kg) v₁' + (4 kg) v₂'
v₁' = -2v₂'
Energy is also conserved, so
1/2 (2 kg) (50 m/s)² + 1/2 (4 kg) (-25 m/s)² = 1/2 (2 kg) (v₁')² + 1/2 (4 kg) (v₂')²
Simplifying yields
2500 J + 1250 J = (1 kg) (v₁')² + (2 kg) (v₂')²
3750 J = (1 kg) (v₁')² + (2 kg) (v₂')²
Substitute v₁' = -2v₂' and solve for v₂' :
3750 J = (1 kg) (-2v₂')² + (2 kg) (v₂')²
3750 J = (6 kg) (v₂')²
(v₂')² = 625 J/kg = 625 m²/s²
v₂' = 25 m/s
Then the first block has final velocity
v₁' = -2 (25 m/s)
v₁' = -50 m/s