Let the speed on the second hike be r. Then the speed on the first hike is (r - 1), and the speed on the third hike is (r - 2). Let the time on the second hike be t, so the third hike's time is t + 0.5 (time in hours).
The second hike lasted 18 km, so 18 = rt. t = 18/r.
The third hike was 14 km, so 14 = (r - 2)(t + 0.5) = rt + 0.5r - 2t - 1
Substituting: 14 = (18) + 0.5r - 2(18/r) - 1
-3 = 0.5r - 36/r
-6 = r - 72/r
-6r = r^2 - 72
r^2 + 6r - 72 = 0
(r + 12)(r - 6) = 0
r = 6 (negative rate is not allowed for this)
Therefore, the speed of the first hike, r - 1 = 5 km/h. Since the distance was 12.5 km, the time was 12.5 / 5 = 2.5 h.
The second hike lasted 18 km / 6 km/h = 3 h.
The third hike lasted half an hour more than the second, which is 3.5 h.
Adding all three times gives 2.5 + 3 + 3.5 = 9 h.