Cars A and B start from places A and B at the same time and go towards each other. Car B travels the whole journey longer than car A per hour (1/20), and the two cars travel the whole journey together per hour (9/20). After meeting for the first time on the way, continue to move forward. Car A arrives at point B, and car B returns immediately after arriving at point A. They meet again on the way. If the two meeting places are 40 kilometers apart, what is the distance between A and B? km?
甲、乙两车分别从A、B两地同时出发相向而行，乙车每小时比甲车多行全程的(1/20)，两车每小时共行全程的(9/20)，他们在途中第一次相遇后继续前进，甲车到达B地，乙车到达A地后立即返回，他们在途中又一次相遇，如果两次相遇的地点相隔40千米，A、B两地相距多少千米？
<gadget id="calculator">40 * 4 * 5</gadget>
<output>800</output>

<gadget id="calculator">40 * 4 * 4</gadget>
<output>640</output>

<gadget id="calculator">40 * 5 * 5</gadget>
<output>1_000</output>

<gadget id="calculator">40 * 5 * 4</gadget>
<output>800</output>

<gadget id="calculator">800 + 640 + 1_000 + 800</gadget>
<output>3_240</output>

<gadget id="calculator">5 * 2 * 4</gadget>
<output>40</output>

<gadget id="calculator">5 * 2 * 5</gadget>
<output>50</output>

<gadget id="calculator">4 * 2 * 5</gadget>
<output>40</output>

<gadget id="calculator">4 * 2 * 4</gadget>
<output>32</output>

<gadget id="calculator">50 - 40 - 32</gadget>
<output>-22</output>

<gadget id="calculator">40 + (-22)</gadget>
<output>18</output>

<gadget id="calculator">3_240 / 18</gadget>
<output>180</output>

<result>180</result>