Now combining those facts into one equation. This is several steps at once
12 / t1 = 10 + 8 / (5 - t1)
The steps were: substitute for s1 in the last equation above (s1 = 10 + s2),
substitute for s2, and then also substitute for t2.
To solve this multiply through on both sides by t1 (5 - t1) and you get
12 (5 - t1) = 10 (t1) (5 - t1) + 8 t1
60 - 12 t1 = 50 t1 - 10 t1^2 + 8 T1
10 t1^2 - 70 t1 + 60 = 0
t1^2 - 7 t1 + 6 = 0
(t1 - 1)(t1 - 6) = 0
t1 = 1 or t1 = 6
clearly t1 can not be 6 since the total was 5 hours (this would mean he walked for -1 hour)
so I think the answer for the time is he biked for 1 hour and walked for 4 hours.
But the question was about the speed, so you have to find that
s1 = d1/t1 = 12/t1 = 12/1 = 12 m p h
s2 = d2 / t2 = 8/4 = 2 m p h
since s2 + 10 = s1 I think this is the right solution.