There are two boxes of apples, A and B, with the same weight. If 20 kilograms are taken out of box A and put into box B, the weight of box B is three times that of box A. How many kilograms of apples are in each box?
有甲乙两箱同样重的苹果，如果从甲箱中拿出20千克，放入乙箱，则乙箱的重量是甲箱的3倍，原来每箱苹果多少千克？
<gadget id="calculator">20 + 20</gadget>
<output>40</output>

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

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

<result>40</result>