This problem uses a system of equations
Let
p = cost of pencils
n = cost of pens
Then we have that
2p + 3n = 18.80
6p + 6n = 45
- 3 (2p + 3n) = 18.80 (- 3)
-6p - 9n = -56.40
6p + 6n = 45
—————————
-3n = - 11.40
n = 3.80
Sol. {A pen costs $3.80}
—> Check:
If p = $3.70 then
2(3.70) + 3(3.80) = 18.80
7.40 + 11.40 = 18.80
18.80 = 18.80