The ratio of the number of books on the upper and lower shelves of the school library is 7:5. If 8 books are taken from the upper shelf and placed on the lower shelf, the ratio of the number of books on the upper and lower shelves is 4:3. How many books are there in total on the shelf?
学校图书室上下两层书架上书的本数之比为7：5，如果从上面的书架上取出8本书放到下面的书架上，则上下两层书架上书的本数之比为4：3，两层书架上一共有多少本书？
<gadget id="calculator">7 + 5</gadget>
<output>12</output>

<gadget id="calculator">7 / 12</gadget>
<output>7/12 = around 0.583333</output>

<gadget id="calculator">4 + 3</gadget>
<output>7</output>

<gadget id="calculator">4 / 7</gadget>
<output>4/7 = around 0.571429</output>

<gadget id="calculator">(7/12) - (4/7)</gadget>
<output>1/84 = around 0.011905</output>

<gadget id="calculator">8 / (1/84)</gadget>
<output>672</output>

<result>672</result>