It took a train 40 seconds to pass through a 500-meter-long tunnel and 25 seconds to pass through a 200-meter-long bridge. Assuming that the average speed of the train passing through the tunnel and the bridge is the same, how long is the train in meters?
某列火车通过500米长的隧道用了40秒，通过200米长的桥梁用了25秒，假设这列火车通过隧道和桥梁的平均速度相同，这列火车长多少米？
<gadget id="calculator">500 - 200</gadget>
<output>300</output>

<gadget id="calculator">40 - 25</gadget>
<output>15</output>

<gadget id="calculator">300 / 15</gadget>
<output>20</output>

<gadget id="calculator">20 * 40</gadget>
<output>800</output>

<gadget id="calculator">800 - 500</gadget>
<output>300</output>

<result>300</result>