we’re integrating the RHS from 0 (ie the maximum height) to v (when it hits the ground). In this case, they’re treating the max height as 0 because you have to start again as the particle falls down since the acceleration is different, so that’s the lower limit, and because the downwards direction is positive, the upper limit of the LHS is the distance to the ground from the maximum, which is just the height
hopefully that makes sense