Answer
The rate during the first portion is $10$ miles per hour. The rate during the cool down phase is $8$ miles per hour.
Work Step by Step
Let $x$ be the speed of the first portion. Then $x-2$ is the rate of the cooldown portion.
Using $D=rt,$ then the conditions of the problem for the first portion is
\begin{array}{l}\require{cancel}
20=xt
\\\\
\dfrac{20}{x}=t
.\end{array}
Using $D=rt,$ then the conditions of the problem for the cooldown portion is
\begin{array}{l}\require{cancel}
16=(x-2)t
\\\\
\dfrac{16}{x-2}=t
.\end{array}
Equating the two equations of $t,$ then
\begin{array}{l}\require{cancel}
\dfrac{20}{x}=\dfrac{16}{x-2}
.\end{array}
By cross-multiplication and by using the properties of equality, then
\begin{array}{l}\require{cancel}
20(x-2)=16(x)
\\\\
20x-40=16x
\\\\
20x-16x=40
\\\\
4x=40
\\\\
x=\dfrac{40}{4}
\\\\
x=10
.\end{array}
Hence, the rate during the first portion, $x,$ is $10$ miles per hour. The rate during the cooldown phase, $x-2,$ is $8$ miles per hour.