Garett and Simon are buying dinner. Garrett purchases 2 hot dog meals and 1 hamburger meal, paying a total of $18. Simon buys 3 hot dog meals and 2 hamburger meals, spending $31 in all. How much do the meals cost?
Cost of hot dog meal = x
Cost of hamburger meal = y
2x + 1y = 18 → y = 18 - 2x (1)
3x + 2y = 31 (2)
Sub (1) into (2)
3x + 2 ( 18 - 2x) = 31
3x + 36 - 4x = 31
3x - 4x = 31 - 36
-x = -5
x = 5 = cost (in dollars) of hot dog meal
Hamburger meal costs 18 - 2(5) = 18 - 10 = $8