We can use the formula d = rt in getting the algebraic equation for the two cars where; d = distance, r = rate, t = time.
Given:

(blue car) = 35 miles per hour

(red car) = 70 miles per hour
distance between the two towns = 140 miles

(blue car)= no. of hours the blue car travels

(red car) = no. of hours the red car travels
Linear equation for the blue car




blue car travels 4 hours from town A to town B.
Linear equation for the red car




red car travels 2 hours from town A to town B.