In the bookcase, the ratio of the books on the upper shelf to the books on the lower shelf is 5:7, and 14 books were taken from the lower shelf and placed on the upper shelf. Now the ratio of the books on the upper shelf to the books on the lower shelf is 8:7. How many books are there in total in the bookcase?
书柜里，上层书和下层书的比是5：7，从下层拿了14本放到上层，现在上层书与下层书的比是8：7．书柜里共有书多少本？
<gadget id="calculator">8 + 7</gadget>
<output>15</output>

<gadget id="calculator">8 / 15</gadget>
<output>8/15 = around 0.533333</output>

<gadget id="calculator">5 + 7</gadget>
<output>12</output>

<gadget id="calculator">5 / 12</gadget>
<output>5/12 = around 0.416667</output>

<gadget id="calculator">(8/15) - (5/12)</gadget>
<output>7/60 = around 0.116667</output>

<gadget id="calculator">14 / (7/60)</gadget>
<output>120</output>

<result>120</result>