Let x be the cost of each notebook. We know that we bought 5 of them, then the total cost of the notebooks is:
[tex]5x[/tex]We had 21 dollars and we spent 5x on the notebooks, this can be express as:
[tex]21-5x[/tex]Finally we know that this is equal to the six dollars we had at the end, then we have the equations:
[tex]21-5x=6[/tex]Solving for x we have:
[tex]\begin{gathered} 21-5x=6 \\ 21-6=5x \\ 5x=15 \\ x=\frac{15}{5} \\ x=3 \end{gathered}[/tex]Therefore each notebook cost $3