Formal charge on an element in a molecule is calculated by using following formula,
Formal Charge = [# of Valence Electrons] - [Electrons in Lone Pairs +
1/2 the # of Bonding Electrons]
Example:
Let's calculate the formal charge present on Oxygen atom in Structure 1. The oxygen atom has,
6 Valence shell electrons
2 Bond Pair Electrons
6 Lone pair Electrons
So,
Formal Charge = [6] - [6+2/2]
Formal Charge = 6 - 7
Formal Charge = -1
You can calculate formal charges on all atoms in all three structure. I have drawn the structures with formal charges.