A student buys 10 notebooks and 10 pencils at the school store. Each notebook cost $2. The total cost is $30. Which equation can be used to find the cost, p, of each pencil?