Let the number of steps be x.

Let the elevator move at n steps per second.

For person A, the elevator moves x - 50 steps. The whole trip takes (x - 50) / n seconds.

For person B, the elevator moves x - 90 steps. The whole trip takes (x - 90) / n seconds.

Person A's trip takes 5 times longer than person B's trip.

ergo,

(x - 50) / n = 5 * (x - 90) / n

x - 50 = 5x - 450

400 = 4x

x = 100