A and B start from A and B respectively, and travel back and forth between A and B. When A arrives at B for the third time, B returns to B for the fifth time. May I ask: How many times did A and B meet in total during the process of traveling (both meeting head-on and catching up are counted as encounters)?
甲、乙两人分别从A、B两地出发，在A、B两地之间不断往返行进，当甲第3次到达B地的时候，乙恰好第5次回到了B地．请问：在甲、乙两人在行进的过程中，一共相遇了多少次(迎面碰到和追上都算相遇)？
<gadget id="calculator">8 + 2</gadget>
<output>10</output>

<result>10</result>