Two cars are traveling toward each other from AB at the same time. The first meeting is at a place 180 kilometers away from A. After the meeting, they continue to move forward. They each arrive at BA and return along the original road. The second meeting is at a distance from A. 260 kilometers away. How many miles is the distance between A and B?
两辆汽车同时从AB两地相向而行，第一次相遇在距A地180千米的地方，相遇后继续前进，各自到达BA两地后沿原路返回，第二次相遇在距A地260千米的地方．AB两地相距多少千米？
<gadget id="calculator">180 * 3</gadget>
<output>540</output>

<gadget id="calculator">540 + 260</gadget>
<output>800</output>

<gadget id="calculator">800 / 2</gadget>
<output>400</output>

<result>400</result>