Answer
$a.\displaystyle \quad t=\frac{1200}{s}$
$b.\quad 30$ minutes
Work Step by Step
If the time $t$ varies inversely with your average speed $s$, then
there is a nonzero constant $k$ such that
$t=\displaystyle \frac{k}{s}$
a.
If $ t=40$ min when $s=30$ mph,
substituting, we find k:
$40=\displaystyle \frac{k}{30}\quad/\times 30$
$k=1200$
Thus, we write: $\displaystyle \quad t=\frac{1200}{s}.$
b.
If $s=40$,
$t=\displaystyle \frac{1200}{40}$ = $30$ minutes.