Photoelectric Effect
If the photon energy were large enough to eject the electron from the metal (here, W is the energy necessary to eject the electron), then the following equation would apply:
The Energy of the photon absorbed (hf) goes into ejecting the electron (W) plus any extra energy left over which would show up as kinetic energy (KE).