Here's how to determine the formula:
* Mercury is a transition metal and can have multiple oxidation states. In this case, it's mercury(II), meaning it has a +2 charge (Hg²⁺).
* Sulfite is the polyatomic ion SO₃²⁻, with a -2 charge.
To balance the charges, you need one Hg²⁺ ion and one SO₃²⁻ ion. This results in the formula HgSO₃.