In the figure, the block B of mass m starts from rest at the top of a wedge W of mass M. All surfaces are without friction. W can slide on the ground. B slides down onto the ground, moves along it with a speed v, has an elastic collision with the wall, and climbs back on to W.