Answer
See below.
Work Step by Step
We know that in physics terms $t=\frac{s}{v}$, so if $s$ is the running distance, then $87-s$ is our running distance and then our equation is: $\frac{s}{6}+\frac{87-s}{25}=5\\25s+6(87-s)=5\cdot6\cdot25\\25s+522-6s=750\\19s=228\\s=12$
So the running distance was $12$ miles and the cycling one was $87-12=75$ miles.