Electron gain enthalpy is the energy released during the addition of one mole of electron to the gaseous atom or element or ion. As F is neutral small amount of energy is released during the addition. As Na+ and Mg2+ are in need of electron as they are positively charged species they take up electron quickly. But O is already having negative charge here, due to electron electron repulsion, this addition releases more energ
When an electron is added to oxygen atom to form O¯ ion ,energy is released.But when another electron is added to O¯ ion to form O2- ion, the energy is absorbed to overcome the strong electrostatic repulsion between the negatively charged O¯ ion and second electron being added.