Escalator problem

How to solve the following question An escalator (moving staircase) of n uniform steps visible at all times descends at constant speed. Two boys, A and B, walk down the escalator steadily as it moves, A negotiating twice as many escalator steps per minute as B. A reaches the bottom after taking 27 steps while B reaches the bottom after taking 18 steps. Find n.

n=54take lcm of 27 and 18

n=54
take lcm of 27 and 18