Two trains, one is 120 meters long and travels 20 meters per second; the other is 160 meters long and travels 15 meters per second. The two trains are moving towards each other. How many seconds does it take from the front of the train to the rear of the train?
两列火车，一列长120米，每秒行20米；另一列长160米，每秒行15米，两车相向而行，从车头相遇到车尾离开需要多少秒钟？
<gadget id="calculator">120 + 160</gadget>
<output>280</output>

<gadget id="calculator">15 + 20</gadget>
<output>35</output>

<gadget id="calculator">280 / 35</gadget>
<output>8</output>

<result>8</result>