I converted the miles per hour into minutes per hour and set up three equations:

x+y+z=d

9x+8y+7z=2016

7x+8y+9z=2352

doing some linear algebra showed that the matrix would simplify down to the equation 9d-2016=2352-7d. Solving for d gives 273.[/spoiler]

Fun!

]]>[spoiler]

101+170+2 is also 273, not 271. You are correct that the amount uphill, downhill and level aren’t fixed, but the 273 total length is fixed. That’s what made this problem interesting to me. You’re drawn to try to compute two equations in three unknowns which you can’t do. You also have to be quite particular about what speed you select for the relative conditions or you may not have a unique solution. I’ll be posting all about this soon in another comment, but if you want to take this further, take a crack at describing what speeds will and will not have a unique answer.

[/spoiler]

]]>It seems there is not a unique solution?

e.g., one choice is that they are 273 miles apart. Of this 105 is level ground, and 168 is downhill on the way there (uphill on the way back).

So on the way there it takes 105/63 + 168/72 = 4 hours

On the way back it takes 105/63 + 168/56 = 4 hours 40 min

But they could also be 271 miles apart: 101 miles level, 170 downhill on the way there, and 2 miles uphill on the way there.

etc.

[/spoiler]

]]>