Two cars A and B move on a straight road with constant velocity. When they move in same direction, they come close by 8 m in 10 s and when they move in opposite direction towards each other, they come close by 20 m in 1 s. The speed of the cars A and B (in m/s) respectively are