This is a relative speed problem applied to an escalator. The effective speed of a person on an escalator relative to the ground is the sum of their walking speed and the escalator's speed when moving in the same direction, and the difference when moving in opposite directions. The total distance (number of steps on the escalator) is the effective speed multiplied by the time.