Why does the second electron affinity has an opposite sign of the first one?
Many non-metals like those in Group 16 and 17 have first electron affinities that are negative.  In other words, the following reaction is exothermic and energy is released.

$$\ce{X + e^{−} -&gt; X^{−} + ~energy}$$

By gaining an electron the group 17 atoms attain a complete octet of electrons and become stabilized.  By gaining an electron the Group 16 atoms are just one electron away from having a filled shell.  Further in both the Group 16 and 17 cases, the protons in the nucleus are not fully screened by the outer electrons, so adding one more electron to form an anion is electrostatically favorable.

However, if we try to add a second electron the reaction becomes endothermic; adding a second electron is unfavorable and energy must be added (endothermic).

$$\ce{X^{-} + e^{−} + ~energy~ -&gt; X^{2−}}$$

It is difficult to add a second electron primarily because of the increased electron-electron repulsion that occurs with the second electron.

Since adding the first electron is exothermic, while adding the second electron is endothermic, the sign reverses when we measure the energy added or released by these two processes.