A has 36 books and B has 24 books. After they both borrowed the same amount, A has 3 times as much as B. How many books did each borrow?
甲有36本书，乙有24本书，两人借出同样多后，甲剩下是乙剩下的3倍，问各借出多少本书？
<gadget id="calculator">36 - 24</gadget>
<output>12</output>

<gadget id="calculator">3 - 1</gadget>
<output>2</output>

<gadget id="calculator">12 / 2</gadget>
<output>6</output>

<gadget id="calculator">24 - 6</gadget>
<output>18</output>

<result>18</result>