It is a plastic collision, masses exert forces on each other, ending up with a joint velocity (U). We fisrt have to express the equation of the velocity at the end of the collision, that is : U= Mv/M+m
Then, express the equation of Ek0 and Ek1 :
Ek0= Mv²/2
Ek1= (m+M)u²/2 = M²v²/2(m+M)
Then...