Answer:
Pens=13
Pencils=27
Explanation:
1. Pens = x, Pencils = y
x+y=40
2. y+5 & x-5 --> y=4x
3. Rearrange the x+y=40 to y=40-x. Then substitute y=4x and y=40-x to 4x=40-x.
4. Solve. 4x=40-x, 5x=40, x=8
5. Plug in x=8 to y=4x -> y=32.
6. Reverse the y+5 & x-5. y=27, x=13.