recall your d = rt, distance = rate * time.
bearing in mind that, when she's going downstream, she's not going 40 mph, she's going 40 + 4 mph, because the stream is adding its speed to it.
likewise, when she's going upstream, she's going 40 - 4 mph, because the stream is eroding speed from it, thus
[tex]\bf \begin{array}{lccclll}
&\stackrel{miles}{distance}&\stackrel{mph}{rate}&\stackrel{hours}{time}\\
&------&------&------\\
Upstream&10&40-4&u\\
Downstream&10&40+4&d
\end{array}
\\\\\\
10=(40-4)u\implies \cfrac{10}{40-4}=u\implies \cfrac{10}{36}=u\implies \cfrac{5}{18}=u
\\\\\\
10=(40+4)d\implies \cfrac{10}{40+4}=d\implies \cfrac{10}{44}=d\implies \cfrac{5}{22}=d[/tex]
so, "u" is 16 minutes and 40 seconds.
and "d" is 13 minutes and about 38 seconds.