y - time taken to reach railway station in car

so she will start daily at 6-y and reach home at 6+y

one day he arrives early at 5 ,

let

x - time taken by her to reach him on the road…this will be the same time for them to reach their house.

z - time he walked on the road…given they reached at 6+y-20(given in question 20 mins early).

wife started at 6-y her journey takes 2x time and reached home at 6+y-20.

so 6-y+2x = 6+y-20 ==> y-x = 10 —> 1st equation.

husband started at 5 travelled for z+x minutes and reached home at 6+y-20 … (6hr+y-20min can also be written as 5hr+y+40min) so …

5+z+x = 5+y+40 ==> y-x = z-40 —> 2nd equation

so from 1 and 2 equations z-40 = 10 ==> z=50 min … so he walked for 50 minutes