As you move to the to right of the periodic table, ionization energy increases meaning more energy needs to be absorbed when removing an electron.
For electron affinity, as you move to the top right of the periodic table, electron affinity increases (meaning it becomes more negative) - more energy is released as you add an electron to the atom. for example, adding an electron to chlorine stabilizes it as it achieves a noble gas configuration. It is greatly positive for the noble gases, meaning energy needs to be absorbed when adding an electron because adding an electron will destabilize the noble gas. For example, when adding an electron to Argon, electron affinity is highly positive because it destabilizes it.