Heya!!!
Answer to your question :
b. Both the effective nuclear charge and the number of shells in the atom containing electrons
Electron affinity is change in energy on addition of an electron to an atom.
Electron affinity basically depends upon:
●Atomic size
●Nuclear charge
Hope it helps ^_^