The best way to solve these sorts of problems that involve two factors of unknown quantities but with certain properties is to use equations:
Let's set some variables
- h: # of hot dogs sold
- s: # of sodas sold
Now based on the information given by the question, let's set up some equations:
- vender sold a combined total of 166 sodas and hot dog
⇒
![s + h = 166](https://img.qammunity.org/2023/formulas/mathematics/college/3etuclwvc33jsd7f952o7b4kwmcpemnpln.png)
- number of hot dogs sold was 54 less than the number of sodas sold
⇒ h = s - 54
Now lets put the equation together
s + h = 166 -- equation 1
h = s - 54 -- equation 2
Solve:
Plug the value of h from equation 2 into equation 1
s + (s - 54) = 166
2s - 54 = 166
2s = 220
s = 110 -- equation 3
Plug the value of s from equation 3 into equation 2
h = 110 - 54 = 56
h = 56
Therefore:
- number of sodas sold: 110
- number of hot dogs sold: 56
Hope that helps!