Speed units are usually a combination of two measurement - mainly distance per time, for example: Miles per Hour, Kilometers per Hour, Meters per Second etc.
These units evolved from the basic formulas to calculate speed:
D = S * T
T = time
if we try to calculate speed (S) we will get:
S = D /T
So , of someone passed 5 miles (D) in 2 hours (T), their speed would be:
5 miles/2 hours = 2.5 miles/hour