Here, velocity of man is, v = 5 km/hr
Velocity of river is, u = 3 km/hr, along QP.
Velocity of swimmer A w.r.t. bank while going from P to Q = v - u
Velocity of swimmer A w.r.t. bank while coming back from Q to P = v + u
Time taken by swimmer A to make the round trip is,
To cross the river straight across man will dive at angle given by,
Therefore time taken by man B to make the round trip is,
The difference of the time taken by two swimmers is,