To assign #"oxidation numbers"#, I would advise you to take a good look at this really nice website, Rules for Assigning Oxidation Numbers.

For this particular problem, the #"sulfite"# anion is a #"polyatomic ion"# which bears a #(-2)# charge. #"Oxygen"# here will have a #(-2)# for oxidation number and since there are #3#, we multiply the oxidation number by it. We let #"x"# represent #"sulfur"# since no rules assign an oxidation number. We let the whole equation equal to the charge of the polyatomic ion.

#color(blue)"Step 1: Set ion equal to charge:"#

#SO_3 = (-2)#

#color(blue)"Step 2: Solve"#

#"Sulfur"color(white)(aa)"Oxygen"#

#darrcolor(white)(aaaaa)darr#

#x+(-2)(3) = -2#

#x +(-6) = -2#

#x = -2+6#

#x = +4#

#"Answer: Sulfur = (+4), Oxygen = (-2)"#