Average speed over a composite journey

A body covers different portions of a journey at different constant speeds (by distance or time splits), and the question asks for the overall average speed.

jee-main 2014 Q2 View
A person climbs up a stalled escalator in 60 s. If standing on the same but escalator running with constant velocity he takes 40 s. How much time is taken by the person to walk up the moving escalator?
(1) 37 s
(2) 27 s
(3) 24 s
(4) 45 s