Class A and Class B originally had the same number of books. Later, Class A bought another 20 books, and Class B took out 30 books from this class and gave them to the first-grade children. At this time, the books of Class A belonged to Class B. 6 times, how many original books are there in the two classes?
甲班、乙班原有图书同样多，后来甲班又买来图书20本，乙班从本班的书中拿出30本送给一年级的小朋友，这时甲班的图书是乙班的6倍，求两班原有图书各多少本？
<gadget id="calculator">30 * 6</gadget>
<output>180</output>

<gadget id="calculator">20 + 180</gadget>
<output>200</output>

<gadget id="calculator">6 - 1</gadget>
<output>5</output>

<gadget id="calculator">200 / 5</gadget>
<output>40</output>

<result>40</result>