Lewis Carroll posed the following problem:
Two travelers spent from 2 o’clock until 9 walking along a level road up a hill and home again; their pace on the level being $x$ miles per hour, uphill $y$ mph, and downhill $2y$ mph. Find the distance walked.
In Carroll’s formulation $x$ and $y$ were given integers. Making use of the additional assumption that the original problem was solvable, find the distance walked.
Let $a$ be the length of the level section in miles
Let $b$ be the length of the hill section in miles
Then $d=2(a+b)$ is the total distance walked
The total time taken is 7 hours, which allows us to set up the equation ...
$$ \frac{2a}x +\frac b{y}+\frac b{2y}=7 \\ \frac 2x a+\frac 3{2y} \bigg( \frac d2-a \bigg)=7 \\ \bigg(\frac 2x- \frac 3{2y} \bigg) a+ \bigg( \frac 3{4y} \bigg ) d=7 $$
So the problem will be solvable with $d=\frac{28y}3 $provided that $$\bigg(\frac 2x- \frac 3{2y} \bigg) =0 \implies 4y=3x $$