a chemist wanted to make 100 grams of SO2. She had only 12 grams of sulfur and 4 grams of oxygen. Unfortunately, the amounts of reactants were not enough to make the desired product. How much S and O2 would she need in order to obtain the desired grams of product with no leftovers?

S + 02 = SO2 + NO LEFT OVER

S + O2 ==> SO2

How many moles SO2 are needed? That is 100g/molar mass SO2 = 100/about 64 = about 1.6 but you need to do it more accurately.
Using the coefficients in the balanced equation, convert 1.6 moles SO2 to
a) moles S
b) moles O2

1.6 mols SO2 x (1 mole S/1 mole SO2 = 1.6 x 1/1 = 1.6 moles S needed.

1.6 moles SO2 x (1 moles O2/1 mole SO2) = 1.6 x 1/1 = 1.6 moles O2 needed.

Now convert 1.6 moles S and 1.6 moles O2 to grams.
moles x molar mass = grams.