Speed
Riding speed = 9 mph
Driving speed = 27 mph
Time
If x hours is the time taken when riding, (x - 1/3) hours is the time taken when driving.
Distance in both instances is the same, D= Speed * time
Therefore,
9*x = 27(x-1/3)
9x = 27x - 27/2
9x = 27x - 9
(9-27)x = -9
-18x = -9
x = 9/18 = 1/2 hours
Distance, D = 1/2 *9 = 4.5 miles