Alicia has to buy some books for the new school year. She buys 2 math books, 3 art books, and 6 science books, for a total of $30. If both the math and science books cost $3 each, what was the cost of each art book?
The total cost of maths books is 2*3 = 
<gadget id="calculator">2*3</gadget>
<output>6</output>
6 dollars.
The total cost of science books is 6*3 = 
<gadget id="calculator">6*3</gadget>
<output>18</output>
18 dollars.
The total cost for maths and science books is 6+18 = 
<gadget id="calculator">6+18</gadget>
<output>24</output>
24 dollars.
The cost for art books is 30-24 = 
<gadget id="calculator">30-24</gadget>
<output>6</output>
6 dollars.
Since he bought 3 art books, the cost for each art book will be 6/3 = 2 dollars.

<result>2</result>