Let x be the total number of hours spent on the train
Let y be the total number of hours spent on the bus
Total hours spent on train and bus = x + y
Given that he travelled 4 hours
⇒ x + y = 4
Distance travelled = Time x Speed
Distance travelled on train = 60x miles
Distance travelled on Bus = 40y miles
Given that he travelled 204 miles
⇒ 60x + 40y = 204
The 2 equations formed are:
x + y = 4 ------------------- ( 1 )
60x + 40y = 204 ------ ( 2 )
Solve for x and y:
From (1) :
x + y = 4
⇒ x = 4 - y ---------------- Sub into (2)
60 (4 - y) + 40y = 204
240 - 60y + 40y = 204
240 - 20y = 204
20y = 240 - 204
20y = 36
y = 1.8
x = 4 - y
x = 4 - 1.8
x = 2.2
Total time travelled on the train = x = 2.2 hours
Total time travelled on the bus = y = 1.8 hours
Answer: He was on the train for 2.2 hours