We can set it up like this, where s is the speed of the canoeist:
[tex] \frac{18}{s} + \frac{4}{s-5} = 3[/tex]
To make a common denominator between the fractions, we can multiply the whole equation by s(s-5):
[tex]s(s-5)[\frac{18}{s} + \frac{4}{s-5} = 3] \\ 18(s-5)+4s=3s(s-5) \\ 18s - 90+4s=3 s^{2} -15s[/tex]
If we rearrange this, we can turn it into a quadratic equation and factor:
[tex]18s - 90+4s=3 s^{2} -15s \\ 22s-90=3 s^{2} -15s \\ 3 s^{2} -37s+90=0 \\ (3s-10)(s-9)=0 \\ s= \frac{10}{3} ,9[/tex]
Technically, either of these solutions would work when plugged into the original equation, but I would use the second solution because it's a little "neater." We have the speed for the first part of the trip (9 mph); now we just need to subtract 5mph to get the speed for the second part of the trip.
[tex]9-5 = 4[/tex]
The canoeist's speed on the first part of the trip was 9mph, and their speed on the second part was 4mph.