Facts
If you maintain an average speed of 80 km/h, it means that you drive 8 miles in an hour. Now that you know that you can get 8 miles in an hour, we have to start counting backwards, 40/8 = 5 hours.
So it takes you 5 hours to travel 40 miles, the distance would be equivalent to almost a trip from Södertälje to Gothenburg.