3 minutes and 20 seconds =200 seconds
200x=200[(400/40)-x]+400
x= 10-x+2
2x= 12
x=6
400/40-x=4
A: The speed of A is 6m/s, and the speed of B is 4m/s..