13. (15 points) Boat A and Boat B travel 8 kilometers per hour downstream and 4 kilometers per hour upstream. If Boat A travels downstream and then returns, and Boat B travels upstream and then returns, both boats start at the same time and return to their starting points after 3 hours. How long during these 3 hours were Boat A and Boat B traveling in the same direction?

将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。
13. (15 points) Boat A and Boat B travel 8 kilometers per hour downstream and 4 kilometers per hour upstream. If Boat A travels downstream and then returns, and Boat B travels upstream and then returns, both boats start at the same time and return to their starting points after 3 hours. How long during these 3 hours were Boat A and Boat B traveling in the same direction?
【Solution】Let the time for a single trip downstream be $x$ hours, then the time for a single trip upstream is (3-
$$
\begin{array}{l}
x \text { ) hours, so: } \\
x:(3-x)=4: 8 \\
8 x=4 \times(3-x) \\
8 x=12-4 x \\
12 x=12 \\
x=1 \\
\end{array}
$$

The time for a single trip upstream:
$$
3-1=2 \text { (hours), }
$$

The time during which the two boats travel in the same direction:
$$
2-1=1 \text { (hour), }
$$

Answer: During the 3 hours, the two boats traveled in the same direction for 1 hour.