If I have 0.17g of Mg and 0.10g of O, and I am asked to find the empirical formula for magnesium oxide, is the following the right way to go about it?

Convert g-> mol
0.17g=0.01mol Mg
0.10g=0.01mol O

Divide by smallest mole amt. (0.01mol)
0.01mol/0.01mol=1
0.01mol/0.01mol=1

Therefore,
1Mg1O
MgO is the empirical formula. Right?

Yes, and no. How did you end up with 0.01 mol Mg and oxygen.

0.17/24.32 = 0.00699 mol Mg.
0.10/16 = 0.00625

Then 0.00625/0.00625 = 1.000 for O.
0.00699/0.00625 = 1.11 for Mg which we round to 1.0 and the formula is MgO