If the person is riding both ways, then time taken = 8 – 3 = 5 hours.
Thus, when the person is riding one way, time taken = 5/2 = 2.5 hours.
If time taken to walk + time taken to ride = 8 hours
Time taken to walk = 8 – 2.5 = 5.5 hours
Therefore, when the person would be walking both ways, time taken = 5.5 × 2 = 11 hours.