In covering a distance of 30km.'A' takes 2 hours more than 'B'. If 'A' doubles his speed,he would take 1 hour less than 'B' . find their rates of walking.

since time = distance/speed,

30/a = 30/b + 2
30/(2a) = 30/b - 1