I assume, here, that point $C$ is on the shore, and that the shoreline is straight. Otherwise, this answer will not work.
Let $x$ be the distance (in kilometers) from point $B$ to point $C.$ Observe that $x$ is no greater than $5$ and no less than $0.$ (Why?) How much time will it take to get from $B$ to $C$ if the man is walking at $5$ kilometers per hour?
Now, note that from the boat's starting point (I'll call it $P$) it is $3$ kilometers to $A$, and from $A$ it is $5-x$ kilometers to $B.$ Using Pythagorean Theorem, how far is it from $P$ to $B$? (Draw a picture if you aren't sure.) How long will it take to get from $P$ to $B$ if the man is rowing at $4$ kilometers per hour?
How long will it take to get from $P$ to $B$ and then from $B$ to $C$? Can you take it from there?