EDIT Since the changes made by Gamow the question is a simple math problem and is solved by hexomino's answer
EDIT 2 I believe that the two line solution wanted is:
From $X$ to $Y$ call uphill $u$, downhill $d$, plane $p$; the distance we require is $u+d+p$
Now the total walk from $X$ to $Y$ and back takes $\frac{52}{3}$ hours, so
$$\frac{52}3 = \frac{u+d}{5.6}+\frac{u+d}{7.2}+\frac{2p}{6.3}$$
hence
$$u+d+p=\frac{52}3 \times \frac{6.3}{2} = 54\frac6{10}$$
why?
because
$$\frac{1}{5.6}+\frac{1}{7.2} = \frac{2}{6.3}$$
which may be seen by multiplying through and simplifying:
$$\frac{1}{5.6}+\frac{1}{7.2} = \frac{720}{56\times72}+\frac{560}{56\times72} = \frac{720+560}{56\times72} = \frac{1280}{4032} = \frac{20\times64}{63\times64} = \frac{20}{63} = \frac{2}{6.3}$$
so \begin{align}\frac{52}3 &= \frac{u+d}{5.6}+\frac{u+d}{7.2}+\frac{2p}{6.3} \\ \rightarrow \frac{52}3 &= (u+d)(\frac{1}{5.6}+\frac{1}{7.2})+p\frac{2}{6.3} \\ \rightarrow \frac{52}3 &= (u+d)\frac{2}{6.3}+p\frac{2}{6.3} \\ \rightarrow \frac{52}3 &= (u+d+p)\frac{2}{6.3} \\ \rightarrow u+d+p &= \frac{52}3 \times \frac{6.3}{2} \\ \rightarrow u+d+p &= 54\frac6{10} \\ \end{align}
Assuming the question is: Harry walked from $X$ to $Y$ in $8$ hours, then walked back to $Y$. The total duration of the trip was $9$ hours $20$ minutes ($\frac{28}3$ hours). How far apart are $X$ and $Y$?
Then we can fit, for example:
$0$ miles (or infinitesimal miles)
Harry walks from $X$ $25.2$ miles up a hill and then $25.2$ miles back down (or any combination of inclines and declines summing to the same) to $Y$ this takes Harry
$\frac{25.2}{5.6}+\frac{25.2}{7.2}=8$ hours;
Harry then stays in $Y$ for $1$ hour $20$ minutes ($\frac43$ hours); and
then takes the quick route home, taking $0$ hours.
$8 + \frac43 + 0 = \frac{28}3$
We could also fit, for example:
$6.3$ miles
Harry walks a total of $25.2$ miles uphill and $25.2$ miles downhill from $X$ to $Y$, again taking $8$ hours;
stays in $Y$ for $20$ minutes ($\frac13$ hours); and
walks the easy way back in a straight line along the plane for $6.3$ miles taking $1$ hour
$8 + \frac13 + 1 = \frac{28}3$
Or:
anything in between (and more)