Here's another way to do this without simultaneous equations.....
Call the time on the bicycle "x".....then the time walking was (6-x)
And....rate times time = distance
So the amount of time on the bike times its rate plus the amount of time walking times that rate = total distance.
40x + 4(6-x) = 186
40x + 24 - 4x = 186 simplify
36x = 162 divide both sides by 36
x = 4 + 1/2 hrs = 4 hrs 30 minutes
And that's the time on the bike
