recall your d = rt, distance = rate * time.
so, let's say hmmm not using xx, let's say his speed going downstream is "r".
Now, notice, going downstream and coming back, is the same distance, say "d" miles.
the travel downstream took 3 hours the one upstream took 4 hours.

now, the kayaker went forth and back, so, the distance is d + d.