Let x represent represent the amount of pencils that Stella bought, and y represent that number of pens that Stella bought.
We know that Stella bought 18 items total, meaning that the number of pencils and pens must equal 18 or :
x + y = 18
Additionally, we know that she spent $21, and that each pencil costs $1, and that each pen costs $1.50. Therefore,
1x + 1.5y = 21
So, the system of equations that can be used to find the number of pencils (x) and the pens (y) she bought would be:
x + 1.5y = 21
and
x + y = 18