what is the answer to this math problem "Sam bought a total of 25 hamburgers and hot dogs. His total bill was 70.50. If each hamburger cost 3 dollars and each hot dog cost 2.50 dollars, how many hot dogs did sam buy?
Let Hamburgers=H
Let Hot Dogs =D
H+D=25
3H+2.5D=70.50
Solve the following system:
{D+H = 25
2.5 D+3 H = 70.5
In the first equation, look to solve for H:
{D+H = 25
2.5 D+3 H = 70.5
Subtract D from both sides:
{H = 25-D
2.5 D+3 H = 70.5
Substitute H = 25-D into the second equation:
{H = 25-D
3 (25-D)+2.5 D = 70.5
3 (25-D)+2.5 D = 2.5 D+(75-3 D) = 75-0.5 D:
{H = 25-D
75-0.5 D = 70.5
In the second equation, look to solve for D:
{H = 25-D
75-0.5 D = 70.5
75-0.5 D = 75-D/2 and 70.5 = 141/2:
75-D/2 = 141/2
Subtract 75 from both sides:
{H = 25-D
-D/2 = -9/2
Multiply both sides by -2:
{H = 25-D
D = 9
Substitute D = 9 into the first equation:
{H = 16
D = 9
Collect results in lexicographical order:
Answer: | D = 9 and H = 16