Empirical formula of the compound is the simplest ratio of components making up the compound.
In 100 g there’s 87.1 g of Ag and 12.9 g of S.
Let’s calculate for 100 g of the compound
Ag S
Mass 87.1 g 12.9 g
Moles. 87.1 /107.8 g/mol 12.9/32 g/mol
=0.8 mol =0.4mol
Divide by the least number of moles
0.8/0.4 =2 0.4/0.4=1
Ratio of Ag to S is 2:1
Therefore empirical formula is Ag2S