Answer
The rate in flatland, $x,$ is $50$ $mph$ and the rate in the mountain, $x-20,$ is $30$ mph.
Work Step by Step
Let $x$ be the rate in flatland. Then the rate in the mountain is $x-20.$
Using $D=rt,$ then the conditions of the problem for the flatland condition is
\begin{array}{l}\require{cancel}
300=xt
\\\\
\dfrac{300}{x}=t
.\end{array}
Using $D=rt,$ then the conditions of the problem for the mountain conditions is
\begin{array}{l}\require{cancel}
180=(x-20)t
\\\\
\dfrac{180}{x-20}=t
.\end{array}
Since the time for both conditions are the same, then
\begin{array}{l}\require{cancel}
\dfrac{300}{x}=\dfrac{180}{x-20}
.\end{array}
By cross-multiplication and by using the properties of equality, then
\begin{array}{l}\require{cancel}
300(x-20)=x(180)
\\\\
300x-6000=180x
\\\\
300x-180x=6000
\\\\
120x=6000
\\\\
x=\dfrac{6000}{120}
\\\\
x=50
.\end{array}
Hence, the rate in flatland, $x,$ is $50$ $mph$ and the rate in the mountain, $x-20,$ is $30$ mph.