Thanks Q. My Mac hates word documents (and I hate macs

)
So let's see... Reminds me of my days in high school.

Lets use preservation of momentum, to find (the measure of) the speed with which the total mass M+m body will begin moving:
where

(total momentum
before impact)=

, and

(total momentum
after impact)=

,
v here is unknown. So we equate and get

, or
![v=\left[\frac{mv_0}{M+m}\right] v=\left[\frac{mv_0}{M+m}\right]](http://www.mathhelpforum.com/math-help/latex2/img/3f8848c18d08c895ce5a943c6db555d4-1.gif)
.
Let's try conservation of energy, at the instants where the total mass begins moving (phase A) and at when it just stops moving at height h (phase B):
(kinetic energy at A)+(dynamic energy at A)=(kinetic energy at B)+(dynamic energy at B),
where
(kinetic energy at A)=
![\frac{1}{2}(m+M)v^2=\frac{1}{2}(m+M)\left[ \frac{mv_0}{M+m}\right]^2 \frac{1}{2}(m+M)v^2=\frac{1}{2}(m+M)\left[ \frac{mv_0}{M+m}\right]^2](http://www.mathhelpforum.com/math-help/latex2/img/6a98705aba0408f1066ab5d0de507141-1.gif)
,
(dynamic energy at A)=0 (no height, no energy!)
(kinetic energy at B)=0 (the total mass has just stopped moving)
(dynamic energy at B)=

.
So by equating these,
and solve for

to get the result.