Let g be the number of packs of gum purchased; c be the number of candy bars purchased, then:
g = c +4
Money spent on gum is the number of packs (g) times the unit cost ($0.85) or:
0.85g
Money spent on candy bars is the number of bars (c) times the unit cost ($0.65) or:
0.60c
Total spent for gum and candy bars is: $15.00, so:
0.85g + 0.60c = 15
Substituting the value above for g:
0.85(c + 4) + 0.60c = 15
0.85c + 3.4 + 0.60c = 15
1.45c + 3.4 = 15
1.45c = 11.6
c = 8
And:
g = c + 4
g = 8 + 4
g = 12