Starting off with what we know:
Gerard:
9(h)amburgers + 3(f)ries = $24.75
Chris:
6(h)amburgers + 4(f)ries = $19.50
Now that we have our linear equations, we can focus on one of the variables, or in this case, foods.
For this problem we can set the equations equal to each other if we subtract their totals on both sides like so:
9(h)amburgers + 3(f)ries -24.75 = $24.75 - 24.75
6(h)amburgers + 4(f)ries - 19.50 = $19.50 -
19.50
This leaves us with:
9(h)amburgers + 3(f)ries -24.75 = 0
6(h)amburgers + 4(f)ries - 19.50 = 0
Now we set them equal to each other:
9(h)amburgers + 3(f)ries -24.75 = 6(h)amburgers + 4(f)ries - 19.50
Set either h or f to 0 and solve!