Let the running speed if Daniel be r mph, then his biking speed is (r+3) mph, because "His running speed is 3 mph slower than his biking speed. "
let the time it took Daniel to get to his friend's house be t hours, then the time it took him to go to his house, from his friend,s house is (2-t) hours , because "His total running and biking time is 2 hours."
the main formula we need to solve this problem is:
Distance=Speed*Time
Daniels biking speed, (r+3) , is Distance/Time=2/(2-t)
so (r+3)=2/(2-t)
we also have the equation 5=rt, because
"Daniel leaves school and runs 5 miles to his friend's house"
we substitute t, by 5/r in the previous equation:
(r+3)=2/(2-t)
(r+3)=2/(2-5/r)
(r+3)(2-5/r)=2
2r-5+6-15/r=2
2r-1-15/r=0
multiply by r:
2r^2-r-15=0
the expression in the left side can be factorized as (2r+5)(r-3), so the equation becomes:
(2r+5)(r-3)=0,
and the roots are r=-5/2, which is not possible in our problem,
and r=3
Daniel's biking speed is r+3=3+3=6 (mph)
Answer: 6 mph