Without the actual figure, I could be off a little. That said, the technique to approach a problem like this is to break it into phases based on what is conserved.
Initially, energy is maintained (while converted from potential to kinetic) as the block slides down from the slope onto the flat portion. Equating initial potential energy with the kinetic energy of the block once it reaches the flat portion allows you to calculate the velocity of the block before the collision.
mgh = 1/2 m v2
In the second phase, assess the elastic collision. Since it's elastic, both kinetic energy and momentum are maintained. This gives us a pair of equations, equating kinetic energy before and after and equating momentum before and after.
1/2 m1 v1i2 = 1/2 m1v1f2 + 1/2 m2v2f2
m1v1i = m1v1f + m2v2f
Third, we assess the movement of the first block as it exchanges kinetic energy for potential energy. Since we know its velocity from phase 2, we can then use:
mgh = 1/2 m v1f2
in order to find the final height that the block will reach.