Yes, take the relation for an electron.
Sidenote: a piece of metal has many electrons at very different energy levels. By using the work function, you implicitly supposed that the extracted electron came from the Fermi level, and the assignment probably made the same mistake.
But this isn't generally the case. If the photon has enough energy to leave the freed electron with speed, then it can perfectly extract an electron from below the Fermi level, and then the remaining kinetic energy is smaller. It's the most common case.
There is more. In every interaction, energy is conserved, and momentum too. The free electron has an energy-momentum relation, the electron in a metal has a completely different one and may have a strong momentum if its energy fits. The photon brings little momentum, so a phonon has to to it, but can be rare.