That's a really common mistake... you're halving to find the middle of a line that isn't linear.
It's a 1/x type of curve.
For your original example:
(1 mile / 40 seconds) x (60 seconds / 1 minute) x (60 minutes / 1 hour) = 60*60/40 = 90 miles / hour
"seconds" is you're independent...