The hint here is to look at the anion of the compound. That is the polyatomic ion, sulfate or SO4. It has a charge of -2. Since the compound does not show any subscript, then it means that the cation must have a charge of +2 for it to be cancelled out. Hence, the elements that can represent X are the elements that have a +2 charge like Fe, Ca, Ba, Mg, Zn, etc.