One day at 8 o'clock in the morning, A set off from point B, and at the same time, B set off from point A in the same direction to chase A, and finally caught up at a place 9 kilometers away from point B. If B doubles his speed and A's speed remains the same, or B starts 40 minutes earlier, then he will catch up at a distance of 2 kilometers from B. Question: How far is the distance between A and B?
某天早上8点甲从B地出发，同时乙从A地同向出发追甲，结果在距离B地9千米的地方追上．如果乙把速度提高一倍，而甲的速度不变，或者乙提前40分钟出发，那么将在距离B地2千米处追上．请问：A、B两地相距多少千米？
<gadget id="calculator">22 - 18</gadget>
<output>4</output>

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

<gadget id="calculator">4 / 5</gadget>
<output>4/5 = around 0.8</output>

<gadget id="calculator">2 * (4/5)</gadget>
<output>8/5 = around 1.6</output>

<gadget id="calculator">(8/5) + 2</gadget>
<output>18/5 = around 3.6</output>

<result>18/5 = around 3.6</result>