Q.
The formation of the oxide ion $O_{\left(g\right)}^{2-}$ requires first an exothermic and then an endothermic step as shown below:
$\begin{matrix}O_{\left(g\right)+e^{-} \rightarrow O_{\left(g\right)}^{-};}&\Delta H=-142\,kJ \,mol^{-1}\\ O\left(g\right)+e \rightarrow O_{\left(g\right)}^{2-};&\Delta H=844\,KJ \,mol^{-1}\end{matrix}$
This is because:
Classification of Elements and Periodicity in Properties
Solution: