Suppose the number of candy bars purchased is x
The questions say he bought A magazine, means one magazine
the equation is
3x+6=30
3x =30–6
3x = 24
x =8
9.4m questions
12.1m answers