There are two baskets with the same quantity of apples. If 6 kilograms are taken out from basket A and 14 kilograms are put into basket B, the weight of apples in basket B is three times that of basket A. How many kilograms of apples are in baskets A and B?
有两筐数量相同的苹果，如果从甲筐拿出6千克，乙筐放进14千克以后，乙筐苹果的重量是甲筐的3倍，甲、乙两筐原有苹果多少千克？
<gadget id="calculator">6 + 14</gadget>
<output>20</output>

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

<gadget id="calculator">20 / 2</gadget>
<output>10</output>

<gadget id="calculator">3 * 10</gadget>
<output>30</output>

<gadget id="calculator">30 - 14</gadget>
<output>16</output>

<result>16</result>