O negative ion is formed by release of energy and O 2- ion is formed by gain of energy.Explain?
Well, you're trying to stuff an electron into a region that is already electron-dense. So you're going to have to overcome electron repulsions in an already-negative ion, thereby requiring the addition of energy.
(Imagine shoving two repulsive magnets together; can't do it easily...)
The first electron affinity of
#"O"(g) + e^(-) -> "O"^(-)(g)#, #" "DeltaH_(EA_1) = -"142 kJ/mol"#
This exothermicity indicates a release of energy upon having gained this first electron. We would expect analogously that the second electron affinity process, i.e.
#"O"^(-)(g) + e^(-) -> "O"^(2-)(g)#,
#DeltaH_(EA_2) = +"844 kJ/mol"#
Adding this second electron requires input of energy, and so the second electron affinity enthalpy is endothermic with respect to the atom.