The empirical formula is calculated as follows
step 1 ; calculate the moles of each element
K = 32.9 g/39 g/mol (molar mass of potassium) = 0.84 moles
O = 6.73 g /16 g/mol ( molar mass of oxygen) = 0.42 moles
step 2 ; calculate the mole ratio by dividing by smallest number of mole
K= 0.84 /0.42=2
O= 0.42/0.42= 1
therefore the empirical formula = K2O