Let the speed of the car starting from A (first car) be ‘x’ km/hr and that starting from B (second car) be ‘y’ km/hr. (x > y)
According to the first condition,
Distance covered by the first car in 7 hours = 7x km
Distance covered by the second car in 7 hours = 7y km
If the cars are travelling in the same direction, 7x – 7y = 70
Dividing both sides by 7,
x – y = 10 …(i)
According to the second condition,
Distance covered by the first car in 1 hour = x km
Distance covered by the second car in 1 hour = y km
If the cars are travelling in the opposite direction
x + y = 70 …(ii)
Adding equations (i) and (ii),
∴ x = 40
Substituting x = 40 in equation (ii), x + y = 70
∴ 40 +y = 70
∴ y = 70 – 40 = 30
∴ The speed of the cars starting from places A and B are 40 km/hr and 30 km/hr respectively.