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
5.7m questions
7.4m answers