To find the empirical formula, we want to find the moles of each element and then reduce them to the smallest whole number. When given % as in this problem, it is easiest to just assume we have 100 g of the unknown, and then % becomes grams.
C: 40.68 g x 1 mol C/12 g = 3.39 moles C
H: 5.12 g H x 1 mol H/1 g = 5.12 moles H
O: 54.20 g O x 1 mol O/16 g = 3.39 moles O
Note that C and O have the same number of moles, so they will have the same number in the empirical formula. However, H has more moles. If we divide all by 3.39 we get
1 mol C
1 mol O
1.5 mol H (still not a whole number, but we can now multiply all by 2)
Final answer...
2 mol C
2 mol O
3 mol H
Empirical formula (arrange in order of C, H, O) = C2H3O2