Let the distance be x miles
Time = Distance / speed
Time taken by Mike to go to his friend's house = x / 40 hours
Time taken by him to return = x / 45 hours
Total time = x / 40 + x / 45 = 4 hours
= 9x + 8x = 1440 miles
17x = 1440
= x = 1440 ÷ 7
= x = 84.706
Time taken to return home = 84.706 /45= 1.882 hours .
Therefore , Mike took 1.882 hours to reach home .