Let N be the number of onion rings in the combo meal.
Let W be the number of chicken wings in the combo meal.
Then N + W = 19
and
40N + 75W = 970.
The first equation can be written as N = 19 - W, and then substituted for N in the other equation.
40(19-W) +75W = 970
40*19 - 40*W + 75W = 970
760 + 35W = 970
35W = 970 - 760 = 210
W = 210 / 35 = 6
N = 19 - 6 = 19 - 6 = 13
Checking:
N + W = 13 + 6 = 19
40N + 75W = 40*13 + 75*6 = 520 + 450 = 970