The correct option is A 4 hr
Let time take by B to walk D km = T
time taken by A to walk D km = (T+2)
Since, ST = D. when distance is constant, Speed is inversely proportional to time taken, means if speed becomes double , time taken would become half.
So,
In second case time taken by A = (T+2)/2
Now, this time A takes 1 hr less than B
(T+2)/2 = T-1
T + 2 = 2T - 2
T = 4 hours.