Two barrels of oil, A and B, have the same weight. If 8 kg is taken out of barrel A and 16 kg is added to barrel B, the weight of oil in barrel B is three times the weight of oil in barrel A. How many kilograms of oil are in each of the two barrels of oil?
甲、乙两桶油重量相等，如果甲桶取出8千克，乙桶加入16千克，这时乙桶油的重量是甲桶油重量的3倍．两桶油原来各有油多少千克？
<gadget id="calculator">8 + 16</gadget>
<output>24</output>

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

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

<gadget id="calculator">12 + 8</gadget>
<output>20</output>

<result>20</result>