the ball and the earth exchange momentum through gravitational interactions, and through impact.

just before impact, v_1=sqrt(2gh_1)

just after impact, v_2=-sqrt(2gh_2)

just before impact, v_1=sqrt(2gh_1)

just after impact, v_2=-sqrt(2gh_2)