The mass ratio of the two bags of sugar between A and B is 4:1. If 10 grams are taken out of the bag and put into the B bag, the mass ratio of the two bags of sugar becomes 7:8, then the two bags of candy What is the sum of the masses in grams?
甲、乙两包糖的质量比是4：1，如果从甲包中取出10克放入乙包后，甲、乙两包糖的质量比变为7：8，那么甲、乙两包糖果质量的总和是多少克．
<gadget id="calculator">4 + 1</gadget>
<output>5</output>

<gadget id="calculator">4 / 5</gadget>
<output>4/5 = around 0.8</output>

<gadget id="calculator">7 + 8</gadget>
<output>15</output>

<gadget id="calculator">7 / 15</gadget>
<output>7/15 = around 0.466667</output>

<gadget id="calculator">(4/5) - (7/15)</gadget>
<output>1/3 = around 0.333333</output>

<gadget id="calculator">10 / (1/3)</gadget>
<output>30</output>

<result>30</result>