A and B start from A and B at the same time and walk toward each other. They meet for the first time at 500 meters away from B. After meeting, they continue to move forward. When they reach A and B, they turn around and walk toward each other. They meet for the second time at a distance of 400 meters from A, find the distance between A and B.
甲乙两人从A，B两地同时出发相对而行，在距B地500米处第一次相遇，相遇后各自继续向前行，当到达A，B两地后又立即转身相对而行．在距A地400米处第二次相遇，求A，B两地的距离．
<gadget id="calculator">500 * 3</gadget>
<output>1_500</output>

<gadget id="calculator">1_500 - 400</gadget>
<output>1_100</output>

<result>1_100</result>