This problem is easily solved using an equation of ratios, as follows:
(5/8) mile 2 1/2 mi
-------------- = ----------=--
(1/6) hour x
Cross multiplying, (5/8)x = (1/6)(5/2)
Thus, (5/8)x = 5/12
x = (5/12) / (5/8) = 8/12 hour, or 2/3 hour, or 40 minutes.