Downstream velocity = still water velocity+current velocity
Backward speed = still water speed-water flow speed
Distance = speed × time
Solution: The downstream distance is (a+b)×2.
The distance of counter-current swimming is (a-b)× 1.
So this swimmer swam: (a+b) × 2+(a-b )×1= 3a+b.
If you are satisfied, please adopt it.