Answer
The function of x is given by the following equation:
$T\left( x \right)=\frac{40}{x}+\frac{40}{x+30}$
It takes $2$ hours to travel at the rate of $30$ miles per hour for the outgoing trip and $60$ miles per hour for the return trip.
Work Step by Step
The time taken in covering a distance is related to the distance as follows:
$\text{Time of travel}=\frac{\text{Distance traveled}}{\text{Rate of travel}}$
Let the time taken for the outgoing trip at speed of x be:
${{T}_{1}}\left( x \right)=\frac{40}{x}$ hours
Then the speed during the return trip is $x+30$
And the time taken for the return trip at a speed of $x+30$ is:
${{T}_{2}}\left( x \right)=\frac{40}{x+30}$ hours
So, the total time taken for the round trip is the sum of the time taken in the outgoing trip and return trip:
$\begin{align}
& T\left( x \right)={{T}_{1}}\left( x \right)+{{T}_{2}}\left( x \right) \\
& =\frac{40}{x}+\frac{40}{x+30}
\end{align}$
Put $x=30$ to calculate $T\left( 30 \right)$:
$\begin{align}
& T\left( 30 \right)=\frac{40}{30}+\frac{40}{30+30} \\
& =\frac{120}{60} \\
& =2
\end{align}$
Thus, the total time of travel is written as a function of x with respect to the time and distance formula.