Cars A and B set off from places A and B at the same time and drive toward each other. After 4 hours, the two cars meet at a distance of 40 kilometers from the midpoint. The ratio of the speed of car A to the speed of car B is 5:7, how many kilometers are the distance between A and B?
甲、乙两车分别从A、B两地同时出发，相向而行，4小时后两车在距中点40千米处相遇．甲车的速度和乙车的速度比是5：7，A、B两地相距多少千米？
<gadget id="calculator">2 / 2</gadget>
<output>1</output>

<gadget id="calculator">7 + 5</gadget>
<output>12</output>

<gadget id="calculator">40 * 1 * 12</gadget>
<output>480</output>

<result>480</result>