2.5x+7y= 100 ①
x+y=22 ②
Available from ②.
x=22-y ③
Bring ③ into ①
2.5*(22-y)+7y= 100
55-2.5y+7y= 100
55+4.5y= 100
4.5y=45
y= 10
Bring y= 10 into ②.
Get x= 12.
Answer: So I bought 12 notebooks and 10 pens.