I found it useful to use different notations for quantities and prices
Let's say upper case letters for the first and lower case letters for the latter
As a consequence we have that the total amount spent by Peter is
Pp + Nn + Ee
Where
P: number of pens bought
p: price of a single pen
N: number of pencils bought
n: price of a single pencil
E: number of erasers bought
e: price of a single eraser
Now, knowing that
p = n + e
And that
P = 3N
And
E = 2N
We can substitute in the above obtaining
3N * (n + e) + Nn + 2Ne = N * (4n + 5e)
Had Peter exchanged the number of Pens and Eraser, he would have spent
2N * (n + e) + Nn + 3Ne = N * (3n + 5e)
Which would have meant a saving of $ 20,00
As a consequence we have that
N * (4n + 5e) - N * (3n + 5e) = Nn = $ 20,00
Now the solution is simply there
Nn = $ 20,00
That is, the amount spent by Peter in pencils is twenty dollars
IMO, the answer is "C"
Posted from my mobile device