distance travlled by first car=120 miles
speed of first car=x mph
time taken by first car=d/s=(120/x)hours
speed of second car=(x+10)mph
distance travelled=120 miles
time taken=d/s=[120/(x+10)]hours
Given,time taken by second car is one hour less than first car.
then,
120/x-120/(x+10)=1
[120(x+10)-120x]/x(x+10)=1
[120x-120x+1200]/x(x+10)=1
1200/x(x+10)=1
1200=x(x+10)
x^2+10x-1200=0
x^2+30x-40x-1200=0
x(x+30)-40(x+30)=0
(x+30)(x-40)=0
x=-30 or +40
Speed cannot be -ve.
hence x=40 mph
Thus speed of first car=40 mph,second car=50 mph
Hope this helps,
good luck.