Answer A can be solved by simply replacing parts of a normal equation with the reference variable we are given: pens + pencils + erasers becomes x + (x + 4) + (x - 2). Since each value given is based off the value for pens purchased, we represent pens with x and our other variables as expressions based on that variable.
For part B, we can’t solve this without knowing the price, or at least I don’t think we can based on how I’m reading the question. Is there a price guide given with the question that needs to be included? I can’t help until seeing that. Hope my answer for part A helped at least.