Question 123257
Hank travels home to Smithville every weekend from Ottawa.The distance each way is 800km. Anxious to return home, he decides to increase his speed by 20km/h and realizes that he arrives home two hours earlier than the time it took him to travel from home to Ottawa. How long does the trip to Ottawa usually take?

Let the normal speed=x kmph
Time for onward trip =dist/speed=800/x .. .. .. .. ..A
Time for return trip=dist/speed=800/(x+20).. .. .. ..B

Difference in times =A-B
gives us:
(800/x)-(800/(x+20))=2
taking x(x+20) as LCM, we get the quadratic 2x^2+40x-16000=0
which boils down to x^2+40x-8000 
solution is:

*[invoke solve_quadratic_equation 1, 20, -8000]

we get x=80
at speed of 80 time=800/80=10hours
at speed 80+20 time=80/100=8 hours
then 10-8 hours=2 hours 
okay