Formation of Cl- is exothermic but formation of O2- is endothermic . Explain
In order to answer this question, one must first ask how the [F]^- and [O}^2- ions are formed. Elements in their natural state at STP will have a Gibbs free energy of Zero (0) by definition.
Fluorine in its elemental state is the MOST electronegative element in the periodic table. F atom is one electron short of forming a stable octet (s2p6) electronic configuration that is considered to be the most stable (Neon is an inert gas). When it has no other recourse, Fluorine atom combines with another Fluorene atom to produce F2 (difluorine molecule), which is stable.
When F atom gains one electron, it changes to Fluoride anion or [F}^-, and the formation of F- releases energy because there is tremendous stability associated with the octet electronic configuration. Thus, F- formation is exothermic.
Oxygen atom has s2p4 electronic configuration, and requires two additional electrons to arrive at the preferred octet configuration; hence oxide di-anion or {O]^2- is a stable structure. When it has no other recourse, oxygen atom reacts with another oxygen to produce O2 (dioxygen molecule) which is somewhat stable. As you know, the stability of O2 molecule is not all that great, because it readily combines with a host of other atoms to form oxides (oxidation, combustion).
When Oxygen atom gains the first electron, there is definitely some energy released, and this step is exothermic. However, the resulting mono-anion does not have an octet configuration, so it continues to seek a second electron. However, the process for adding a negative particle (electron) to an already negative species (oxide mono-anion) requires a lot of energy, due to the repulsive forces between two negatively charged species. The excess energy to be supplied to force O- to accept another electron to become O2- is higher than the little bit of energy that is released from the formation of O- from O atom.
So, if you sum up both the steps, you will find that overall you have to supply additional energy to Oxygen atom in order for it to accept TWO electrons and become [O]^2-. So, this reaction is endothermic (requires addition of energy to make it happen).