Use the group number to determine the charge on an ion derived from each element.

Lithium:

Barium:

Sulfur:

Chlorine:

Lithium: Group number 1 -> Charge on ion derived from Lithium is +1.

Barium: Group number 2 -> Charge on ion derived from Barium is +2.

Sulfur: Group number 16 -> Charge on ion derived from Sulfur can be either -2 or +6, depending on the compound.

Chlorine: Group number 17 -> Charge on ion derived from Chlorine is -1.