To solve this question, we will rely on the following equation for potential energy:
where m is the mass, g is gravity (I'll assume gravity as 9.81 m/s^2) and h is height
when we start, the ball is not moving, so its total energy can be found from the equation provided above.
Then, the ball bounces off the floor, and transfers some of its energy into the ground. The energy it has left only allows it to reach a height of 4 meters. using the same equation with the new height:
we will get a new potential. The difference between the two is the energy lost to the ground (Ep1-Ep2)