Charlie had rice cakes and 3 granola bars as snacks last week
Required is the number of rice cakes Charlie had the previous week
let number of granola bar be b
and
let number of rice cake be a
ax + by = z.............(1)
ax + 3y = z......... (1)
x =calories of rice cake = 40
a = number of rice cakes
z = Total number of calories snacks = 800
y = calories of granola bar = 120
40a + 3(120) = 800
40a = 800 - 360
40a = 440
40a/40 = 440/40
a = 11 rice cakes