Any certain amount or quantity of one thing which is considered in relation to a unit of another (related) thing is said to be the rate.
Also, rate is the ratio of two different quantities.
Here in the given quantities, 240 miles/8 minutes and 35 km/5 minutes are not the rates since the values in their denominators are not unit quantities.