(a) Phosphorus is [Ne]3s23p3: its three 3p electrons occupy three different 3p orbitals (Hund's rule), giving a half-filled subshell. Sulphur is [Ne]3s23p4: two of its four 3p electrons must share one orbital, and their mutual repulsion makes it easier to remove one of them. So S (1000 kJ mol⁻¹) is slightly lower than P (1012 kJ mol⁻¹), even though its nuclear charge is larger.
(b) Across the period the nuclear charge increases while the electrons are added to the same shell (n=3), so the effective nuclear charge increases and the electrons are held more tightly. Sodium has a single 3s electron outside a noble-gas core; it is well shielded and easily lost (496 kJ mol⁻¹). Argon has the largest nuclear charge of the period and a completely filled, very stable 3s23p6 shell, so it has the highest value (1521 kJ mol⁻¹).