Call the notebooks x, and the pencils y.
3x + 4y = $8.50 and 5x + 8y = $14.50
Then just solve as simultaneous equations:
3x + 4y = $8.50
5x + 8y = $14.50
5(3x + 4y = 8.5)
3(5x + 8y = 14.5)
15x + 20y = 42.5
15x + 24y = 43.5
Think: DASS (Different Add, Similar Subtract). 15x appears in both equations so subtract one equation from the other. Eassier to subtract (15x + 20y = 42.5) from (15x + 24y = 43.5)
(15x + 24y = 43.5) - (15x + 20y = 42.5) = (4y = 1) which means y = 0.25.
Then substitue into equation :
15x + 20y = 42.5
15x + 5 + 42.5
15x = 42.5 - 5 = 37.5
15x = 37.5
x = 2.5
15x + 24y = 43.5
15(2.5) + 24(0.25)
37.5 + 6 = 43.5
So x (notebooks) are 2.5 ($2.50) each and y (pencils) are 0.25 ($0.25) each.