Cynthia W. answered 09/08/20
Experienced College Tutor, Specializing in Accounting
The best way to solve this kind of problem is to set up a system of equations. In this case we can create two equations by allowing x = hotdogs and y = hamburgers.
"Seven hotdogs and four hamburgers cost $15" translates into the equation: 7x + 4y = $15
"Four hotdogs and seven hamburgers cost $18" translates into the equation: 4x + 7y = $18
We then have to solve our system of equations. The best way to do so would be to describe one of the variables in terms of another variable. In this case, we can solve for how many hamburgers (y) we can buy with the money it would cost us to buy a hotdog (x).
You can use either equation to do this, I chose the first equation (7x + 4y = $15) for no particular reason. We can solve for x as follows:
7x + 4y = $15
- Move 4y to the other side:
7x + 4y (-4y) = 15 (-4y)
7x = 15 - 4y
- Get x alone by dividing by 7:
7x (/7) = (15 - 4y)/7
x = (15/7) - (4/7)y
Now we can use this new equation to fill in for x in the other equation (4x + 7y = $18) as follows:
4 [(15/7) - (4/7)y] + 7y = 18
Then we can simplify the equation:
(60/7) - (16/7)y + 7y = 18
In order to solve for y efficiently, we can get rid of the dividing 7 by multiplying each side of the equation by 7. This will help the equation look nicer.
7 * [(60/7) - (16/7)y + 7y] = 18 * 7
60 - 16y + 49y = 126
Now we can solve for y!
60 + 33y = 126
33y = 126 - 60
33y = 66
y = 2
Now we know that one hamburger costs $2! Using our original equation for x (hotdogs) we can now solve for the price of a hotdog:
x = (15/7) - (4/7) * 2
x = (15/7) - (8/7)
x = (7/7) = 1
Finally we have our solution: one hotdog costs $1 and one hamburger costs $2.
I hope that helps!