Two cities A and B are driving in opposite directions at the same time. The two cars meet for the first time 50 kilometers away from city A. After arriving at the station, they stop for 20 minutes to get on and off the passengers and then return. When they return, they meet again at a distance of 40 kilometers away from city B. Ask how many kilometers the two cities A and B run together?
A、B两城同时对开客车，两车第一次在距A城50千米外相遇，到站后各停20分钟上下乘客再返回，返回时在距B城40千米处又相遇，问A、B两城相跑多少千米？
<gadget id="calculator">50 * 3</gadget>
<output>150</output>

<gadget id="calculator">150 - 40</gadget>
<output>110</output>

<result>110</result>