Tony had an equal number of cranberry bars and walnut bars. He gave away 66 cranberry bars, he had 4 times as many walnut bars as cranberry bars left. How many bars did he have at first?

c=w

4(c-66)=w

4c-264=w

4c-264=c (because c=w)

3c-264=0

3c=264

c=88 cranberry bars

w=88 walnut bars

88+88=176 bars at first

check: 88-66=22 and 88 is 4 times 22