The gain in potential energy is 36250 joules in both cases, calculated by multiplying mass, gravity and height. Gravitational potential energy depends only on vertical height and is completely independent of the path taken.
Home/gain in the potential energy if the student is lifted straight