A drunkard walking in a narrow lane takes 5 steps forward and 3 steps backward, followed again by 5

A drunkard walking in a narrow lane takes 5 steps forward and 3 steps backward, followed again by 5

image
As we can see from the graph, he’ll take 37 sec to fall into the pit.

Net displacement (forward - backward) = 2 steps = 2 m in every 8 sec. (5 sec forward and 3 sec backward)
so he goes first 8m in 8 x 8/2 = 32 sec.
and remaining 5m (13 - 8) in next five steps which require 5 sec.
So total time is 37 sec.