The potential energy of an object at a height h due to the gravitational force of attraction of the Earth is given by the product of its mass, the height it is at and the gravitational acceleration. The potential energy is therefore m*g*h.
If mechanical energy is conversed when the roller coaster moves from the top of a hill to the top of a hill which has a lower height its potential energy is decreasing. If its initial height was H and the final height is h, the decrease in potential energy is m*g*(H - h). This should be transformed into the kinetic energy of the roller coaster. The roller coaster has a larger kinetic energy at the top of the hill which has a lower height.