Let's start by calculating how much David spent on the notebooks.
David buys 3 notebooks, and each notebook costs $4. Thus, the total cost for the notebooks can be calculated as follows:
\[ \text{Total cost of notebooks} = \text{Number of notebooks} \times \text{Cost per notebook} = 3 \times 4 = 12 \text{ dollars} \]
Now, we know that the total amount David spends is $16. To find out how much he spent on the pens, we can subtract the cost of the notebooks from the total amount spent:
\[ \text{Total cost of pens} = \text{Total cost} - \text{Total cost of notebooks} = 16 - 12 = 4 \text{ dollars} \]
David buys 2 pens for a total of $4. To find the cost of each pen, we can divide the total cost of the pens by the number of pens:
\[ \text{Cost per pen} = \frac{\text{Total cost of pens}}{\text{Number of pens}} = \frac{4}{2} = 2 \text{ dollars} \]
Therefore, the amount David spent on each pen is $2.