One day, Xiao Gang rode a bicycle from A to B. After 54 minutes, Xiao Ming rode a motorcycle to overtake him. He caught up with Xiao Gang at a place 9 kilometers away from A, and then returned to A immediately, and then went back to A again. Catch up and catch up with Xiao Gang at a place 12 kilometers away from A. After catching up, return to catch up again. It happens that the two of them arrive at B at the same time. How many kilometers are there between A and B?
一天小刚骑自行车从甲去乙地，54分钟后，小明骑摩托车去赶超，在离甲9千米的地方赶上小刚，随后立即返回甲地，回到甲地后又重去赶超，在离甲12千米的地方又赶上小刚，赶上后再一次返回重去赶超，刚好两人同时到乙地，甲乙两地相距多少千米？
<gadget id="calculator">12 * 2</gadget>
<output>24</output>

<gadget id="calculator">9 + 12</gadget>
<output>21</output>

<gadget id="calculator">12 - 9</gadget>
<output>3</output>

<gadget id="calculator">21 / 3</gadget>
<output>7</output>

<gadget id="calculator">7 - 1</gadget>
<output>6</output>

<gadget id="calculator">24 / 6</gadget>
<output>4</output>

<gadget id="calculator">12 + 4</gadget>
<output>16</output>

<result>16</result>