(a) As we move from left to right the increase in atomic number and decrease in size results in a greater nuclear pull. As a result, the ability to attract the electrons increases, and so does the electron affinity.
But noble gases have complete stable octet configuration, hence their electron affinity is lower than halogens.
Hence halogens on extreme right have highest electron affinity in a period.
(b) Chlorine is smaller than sulphur with a bigger atomic number. Since its nuclear pull is more, hence its electron affinity is higher than sulphur.