Question 1027680
As asked, the question poses two numbers, a slow and fast speed. We can do the math with all letters, variables, but no need, replacing with numbers can illustrate the issue far simpler.

I happen to run at 6mph, and walk at 4mph. Say the race is 12 miles. 

Fred runs 6 miles which happens to take 1 hour, then walks 6 miles which at 4mph takes 1.5 hours. His total time is 2.5 hours. 

Now, for frank, his time is X hours.  At 4mph, his distance is (1/2)Xhr*4m/hr = 2X miles , At 6mph, his distance is (1/2)Xhr*6m/hr = 3X miles, total 5X=12 or X = 2.4 hours.  Frank finishes first. 

You can change the numbers, and find the results, the ratio of times, exactly the same.