A and B start from A and B at the same time and walk toward each other, and they meet after 5 hours. If A walks 3 kilometers more per hour and B walks less 1 kilometer per hour, it only takes 4 hours to meet each other. Find the distance between A and B.
甲、乙两人同时从A、B两地出发相向而行，5小时后两人相遇．如果甲每小时多走3千米，乙每小时少走1千米，则只需要4小时即可相遇．求AB两地之间的距离．
<gadget id="calculator">4 * 3</gadget>
<output>12</output>

<gadget id="calculator">12 - 4</gadget>
<output>8</output>

<gadget id="calculator">5 - 4</gadget>
<output>1</output>

<gadget id="calculator">8 / 1</gadget>
<output>8</output>

<gadget id="calculator">8 * 5</gadget>
<output>40</output>

<result>40</result>