Cooper had $30 to spend on 2 beakers for his science class. After buying them, Cooper had $12 left. How many dollars did each of the beakers cost?