write and solve an equation to answer the question Alan bought 3 pencils and a notebook. the notebook cost $6,and he spent a total of $12. how much did each pencil cost use p to represent the cost of each pencil.