J.R. S. answered 11/30/21
Ph.D. University Professor with 10+ years Tutoring Experience
I'll add my 2 cents to the answer provided by Robert S. We do arrive at the same answer so you now have 2 ways of looking at the problem (they are essentially the same, really).
Ni(s) + O2(g) ==> NiO(s)
mass of NiO = 3.158 g
mass Ni = 2.241 g
mass O = 3.158 g - 2.241 g = 0.917 g
mols Ni used = 2.241 g Ni x 1 mol Ni / 58.69 g = 0.03817 mols Ni
mols O = 0.917 g O x 1 mol O / 16 g = 0.05731 mols O
Divide both by 0.03817 to try to get whole numbers
Ni = 0.03817 / 0.03817 = 1.0
O = 0.05731 / 0.03817 = 1.50
Still not whole numbers, so we can multiply by 2 to get whole numbers:
Ni = 1.0 x 2 = 2.0
O = 1.5 x 2 = 3. 0
Empirical formula = Ni2O3
This is nickel peroxide or nickel (III) oxide