Solution: Let ‘X’ and ‘Y’ be the two cars starting from places ‘A’ and ‘B’.

Speed of car ‘X’ = x km/hr,

and Speed of car ‘Y’ = y km/hr

**Case 1. When two cars move in the same direction:**

Suppose two cars meet at a point P, then

Distance travelled by the car A in 6 hrs is AP = Speed x Time

= (x km/hr) x (6hr)

= 6x km ………..(1)

Distance travelled by the car Y in 6 hours is BP = (y km/hr) x (6h)

= 6y km ………….(2)

Distance between the two places A and B = Distance travelled by the car X – Distance travelled by the car Y

= AB = AP – BP

using equations (1) and (2), we get

= 120 = 6x – 6y

= x-y=20 ………..(3)

**Case 2. When two cars move in the opposite directions (towards each other):**

Suppose two cars meet at a point Q, then

Distance travelled by the car ‘X’ in 1 hour is AQ

= (x km/hr) x (1hr)

= x km …….. (4)

Distance travelled by the car ‘Y’ in 1 hour is BQ

= (y km/hr) x (1 hr)

= y km ………(5)

Distance between two places A and B = Distance travelled by the car X + Distance travelled by the car Y

= AB = AQ + BQ

By Using eq. (4) and (5), we get

= 120 = x + y

adding and subtracting (3) and (6), we get

= 2x = 140 and 2y = 100

= x = 70 and y = 50Hence, the speed of the two cars are 70 km/hr and 50 km/hr respectively