Two trains are traveling towards each other from cities A and B. The first encounter was 500 kilometers away from A. After meeting, the two trains continued to move forward, and turned back after reaching their destinations. The second encounter was 300 kilometers away from City B. How far is the distance between city A and city B?
两列火车从A、B城相向而行．第一次相遇在离A地500千米处．相遇后，两列车继续前进，各自到达目的地后，又折回．第二次相遇在离B城300千米处．问A城、B城相距多远？
<gadget id="calculator">500 * 3</gadget>
<output>1_500</output>

<gadget id="calculator">1_500 - 300</gadget>
<output>1_200</output>

<result>1_200</result>