Let the length of the escalator be \( L \).
The speed of the person walking on the stalled escalator is \( v_p = \frac{L}{80} \) m/s.
The speed of the moving escalator is \( v_e = \frac{L}{20} \) m/s.
When the person walks up the moving escalator, his effective speed is the sum of his walking speed and the escalator's speed, since both are in the same direction.
Effective speed \( v_{eff} = v_p + v_e = \frac{L}{80} + \frac{L}{20} \).
To add these fractions, find a common denominator, which is 80:
\( v_{eff} = \frac{L}{80} + \frac{4L}{80} = \frac{5L}{80} = \frac{L}{16} \) m/s.
The time taken by the person to walk up the moving escalator is the length of the escalator divided by the effective speed:
Time \( t = \frac{L}{v_{eff}} = \frac{L}{\frac{L}{16}} = L \cdot \frac{16}{L} = 16 \) s.