The red edge of the photoelectric effect for a metal corresponds to a wavelength of $\lambda = 500$ nm. Find the work function of the electron. Planck's constant is $h = 6.63 \cdot 10^{-34}$ J·s and the speed of light is $c = 3 \cdot 10^8$ m/s.
At the red edge the kinetic energy of the photoelectrons is zero, so the work function equals the photon energy:
$$A = \frac{hc}{\lambda} = \frac{6.63 \cdot 10^{-34} \cdot 3 \cdot 10^{8}}{5 \cdot 10^{-7}} \approx 3.98 \cdot 10^{-19} \text{ J}$$
Convert to electronvolts ($1$ eV $= 1.6 \cdot 10^{-19}$ J):
$$A = \frac{3.98 \cdot 10^{-19}}{1.6 \cdot 10^{-19}} \approx 2.49 \text{ eV}$$
$A \approx 3.98 \cdot 10^{-19}$ J $\approx 2.49$ eV