Two baskets of apples with the same weight, if basket A sells 5 kilograms and basket B sells 21 kilograms, the remaining kilograms in basket A will be three times that of basket B. How many kilograms are there in each of the two baskets?
两筐重量相同的苹果，甲筐卖出5千克，乙筐卖出21千克后，甲筐余下的千克数是乙筐的3倍，两筐苹果原来各有多少千克？
<gadget id="calculator">21 - 5</gadget>
<output>16</output>

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

<gadget id="calculator">16 / 2</gadget>
<output>8</output>

<gadget id="calculator">8 * 3</gadget>
<output>24</output>

<gadget id="calculator">24 + 5</gadget>
<output>29</output>

<result>29</result>