When the smaller body is sliding on the larger block it has two velocities, one horizontal and the other vertical. Let them be w and v respectively. Since the smaller body is in contact with the bigger one both the bodies will have same horizontal velocity during the vertical climb.
Now conserve the linear momentum in the horizontal direction, because no external force is acting on them in the horizontal direction.
mu = (m + M) w ------- (1)
Now for the vertical velocity we have conservation of energy. As there is no loss of energy due to friction or other means ,
mu2 /2 = (m + M) w2 /2 + mv2 /2 + mgh -------- (2)
Maximum height reached can be calculated from the following
mgH = mv2 /2 ----------- (3)
After the smaller block leaves the bigger block it travels like a projectile with horizontal velocity ' w ' and vertical velocity ' v '. Since the horizontal components of both the masses are same the smaller block will land back on the bigger block again. The time of flight can be obtained from
T = 2v / g --------- (4)
During this time the larger block would have traveled a distance of ' S ' given by
S = w T --------- (5)
We can further enhance the questionnaire of this problem by the following two questions
1) What will be the velocities of both the bodies after smaller block reaches the horizontal portion of the bigger block?
2) What will be the center of mass velocity of the system during the entire motion in the horizontal direction?