The energy of a photon is related to its wavelength \( \lambda \) by:
\[
E = \frac{hc}{\lambda}
\]
Where \( h \) is Planck's constant and \( c \) is the speed of light. The energy required to initiate the photoelectric effect is equal to the work function \( \phi \) of the metal. Given \( \phi = 9 \, \text{eV} \), we convert it to joules:
\[
\phi = 9 \times 1.6 \times 10^{-19} \, \text{J}
\]
Now, solving for \( \lambda \):
\[
\lambda = \frac{hc}{\phi} = \frac{(6.63 \times 10^{-34})(3 \times 10^8)}{9 \times 1.6 \times 10^{-19}} = 1.37 \times 10^{-7} \, \text{m}
\]
Thus, the longest wavelength of light is \( 1.37 \times 10^{-7} \, \text{m} \).