Two vehicles, passenger and freight, are traveling toward each other at the same time from places A and B. They meet for the first time at a place 120 kilometers away from place A. After meeting, they continue to move forward and return immediately after arriving at places B and A respectively. The midpoint meets at a place 30 kilometers away from B, how many kilometers is the distance between A and B?
客货两车从甲乙两地同时相向而行，第一次在离甲地120千米的地方相遇，相遇后继续前进，分别到达乙甲两地后立即返问，第二次在离两地中点偏向乙地30千米的地方相遇，求甲乙两地相距几千米？
<gadget id="calculator">120 * 2</gadget>
<output>240</output>

<gadget id="calculator">30 + 120 + 240</gadget>
<output>390</output>

<gadget id="calculator">1 / 2</gadget>
<output>1/2 = around 0.5</output>

<gadget id="calculator">(1/2) + 1</gadget>
<output>3/2 = around 1.5</output>

<gadget id="calculator">390 / (3/2)</gadget>
<output>260</output>

<result>260</result>