Answer: gotta scroll down sry
Explanation:
First set up equations with variables that show the information you have:
c = chocolate // g = gummy // h = hard candy
178 = c + g + h
h = c + 15
g = 2c - 5
Then, solve all the equations for a number:
178 = c + g + h (leave as is)
15 = -c + h (subtract 'c' from the original equation's right side and switch the sides of the equation)
-5 = -2c + g (subtract '2c' from the original equation's right side and switch the side of the equation)
Then, line up all the variables and subtract the top equation by the lower two:
178 = c + g + h
15 = -c + 0g + h
-5 = -2c + g + 0h
---------------------------
168 = 4c + 0g + 0h >>>> 168 = 4c
Solve for 'c' and plug it into the other equations to find 'h' and 'g':
168/4 = 4c/4
42 = c
15 = -(42) + h -5 = -2(42) +g
57 = h 79 = g
Add all the numbers together to double-check:
42 + 57 + 79 = 178
chocolates = 42
gummies = 79
hard candies = 57