A bullet of mass m=10 g is fired with initial speed vi = 400 m/s into a block
of mass M=2 kg initially at rest at the edge of a frictionless table of height h=1 m as
shown in the figure. The bullet remains in the block, and after the impact the block lands
a distance d from the bottom of the table. Determine the distance d.