Let x stand for the total distance walked.
Let y stand for the distance walked uphill.
There are 4 pieces to the walk: Level, uphill, downhill, level
So using distance = rate X time (d = rt) then t = d/t. So the four times are added together and set equal to 5:
The result is one equation with two variables. Is this okay?