A shop sells one-pound bags of peanuts for $2 and three-pound bags of peanuts for $5.

If 9 bags are purchased for a total cost of $36, how many three-pound bags were
purchased?

2 answers

O + T = 9

T = 9 - O

2O + 5T = 36

Substitute 9-O for T in last equation and solve for O. Insert that value into the first equation and solve for T. Check by inserting both values into the second equation.
the answer is 9