The distance travelled in an hour by a certain object is called the speed of the object.
Distance travelled by Hamid in one hour$$=9$$km
Distance travelled by Akhtar in one hour$$=12$$km
Hamid's speed$$=9$$km/hr
Akhtar's speed$$=12$$km/hr
Ratio of speed of Hamid to the speed of Akhtar$$=9/12$$
$$=3/4$$.