Train A is 500 meters long and train B is 400 meters long. It is known that the speeds of trains A and B are 20 meters per second and 25 meters per second respectively, and the two trains are moving towards each other, how many seconds does it take from the front of the trains to the rear of the trains?
甲列车长500米，乙列车长400米．已知甲、乙列车的速度分别为每秒20米和每秒25米，两列车相向而行，从车头相遇到车尾相离需要多少秒？
<gadget id="calculator">500 + 400</gadget>
<output>900</output>

<gadget id="calculator">20 + 25</gadget>
<output>45</output>

<gadget id="calculator">900 / 45</gadget>
<output>20</output>

<result>20</result>