The energy $(E)$ of a $300 \, nm$ photon is given by $E = \frac{hc}{\lambda}$.
Energy per photon $= \frac{6.626 \times 10^{-34} \, J \, s \times 3.0 \times 10^{8} \, m \, s^{-1}}{300 \times 10^{-9} \, m} = 6.626 \times 10^{-19} \, J$.
The energy of one mole of photons $= 6.626 \times 10^{-19} \, J \times 6.022 \times 10^{23} \, mol^{-1} = 3.99 \times 10^{5} \, J \, mol^{-1}$.
The minimum energy (work function,$\Phi$) needed to remove one mole of electrons from sodium is the difference between the incident energy and the kinetic energy: $\Phi = (3.99 - 1.68) \times 10^{5} \, J \, mol^{-1} = 2.31 \times 10^{5} \, J \, mol^{-1}$.
The minimum energy for one electron $= \frac{2.31 \times 10^{5} \, J \, mol^{-1}}{6.022 \times 10^{23} \, mol^{-1}} = 3.84 \times 10^{-19} \, J$.
The maximum wavelength $(\lambda_{max})$ is given by $\lambda = \frac{hc}{E} = \frac{6.626 \times 10^{-34} \, J \, s \times 3.0 \times 10^{8} \, m \, s^{-1}}{3.84 \times 10^{-19} \, J} = 517 \, nm$.