Let,
pencils be "x"
pens be "y"
According to the question,
17x + 18y = 61.50 ----------> equation (1)
10x + 21y = 57 -----------------> equation (2)
Now,
Taking equation (1),
17x + 18y = 61.50
18y = 61.50 - 17x
y = (61.50 - 17x ) / 18 -----> equation (3)
Now, substituting the value of "y" in equation (2), we get,











Now,
Substituting the value of "x" in equation (3), we get,






approx. (rounded)
So, Each pencil costs $1.5 and each pen costs $2.