A student bought a book for $7 and a pen. The total cost was $9. Which of the following equations can be used to find the cost of the pen?

Answer: D
Step-by-step explanation:
$7 = cost of book
(p) = cost of pen as a variable
add them together, for total price: $9
7+p=9