Let the # of dogs sold be x and the # of bags of chips sold be y. Then the
total income from these sales would be T(x,y) = ($4)x + ($2)y.
Now let y = 24 bags of chips. Then,
T(x,24) = ($4)x + ($2)(24) = $120.
$120 = $4x + $48. Then 4x=72, and x = 18. Sell 18 hot dogs.