in order to determine empirical formula we have to determine the mole ratio of the given elements
Let the total mass of the compound is 100g
as given that the compound has 40% sulfur , so mass of sulfur = 40g
as given that the compound has 60% oxygen, so mass of oxygen = 60g
let us calculate the moles of each element
Moles of sulfur = mass / atomic mass = 40 / 32 = 1.25
moles of oxygen = mass / atomic mass = 60/ 16 = 3.75
In order to get simple ratio of moles we will divide both the moles with least number of moles which is 1.25
moles of sulfur = 1.25 / 1.25 = 1
moles of oxygen = 3.75 /1.25 = 3
So empirical formula will be SO₃