According to newton’s third law of motion, the force exerted on the floor by the person is equal and opposite the force exerted on the person by the floor.
According to the second law of newton’s law of motion, the net force exerted on the person is equal to the person’s mass times the person’s acceleration.
The net force exerted on the person = Force exerted by the floor+ Force exerted by gravity.
The work performed on you by the elevator is force times displacement = -MgH
Negative sign shows it is moving upwards, i.e., against g.