The easiest electron to remove from an atom is always on the outside layer. Being furthest from the nucleus to outermost electrons are the least tightly held to the nucleus.
In the case of sodium, the first electron to be removed is the single outermost electron.
The energy needed to remove the first electron from sodium atoms is 502 kilojoules per mole i.e. 502 kJ mol-1. This is the energy required to remove one electron from every atom in a mole of free sodium atoms, hence the gas state symbol in the equation.
In the case of chlorine the first electron to be removed again comes from the outermost…