These are referring to two different things, I believe. In particular, this looks like it's discussing the photoelectric effect, where that light incident on a metallic surface ejects electrons from that surface by imparting energy to them. In that case, the first equation
$$hf = KE - \phi$$
is describing the relation between the energy of the photon emitted and the electron ejected. The $KE$ refers to the electron kinetic energy. Actually, this equation looks like it's for the inverse process (adsorption of an electron onto the metal surface followed by attendant release of a photon). The equation for ejection should be
$$KE = hf - \phi\ \mbox{(electron ejection)}$$
where in both cases $\phi$ is the work function of the material, that is, the energy required to desorb one electron from the surface and conversely the energy released when an electron is adsorbed. $hf$ is the photon energy of the incoming photon, part of which is expired to wrench the electron from the grip of the surface, while the remainder ends up as the kinetic energy in the outgoing electron. Note that if $hf < \phi$ then no electron ejection will occur (to first order).
The energy of a photon alone is just
$$E_\mathrm{photon} = hf$$
or
$$E_\mathrm{photon} = \hbar \omega$$
is preferred theoretically as angular velocity $\omega$ is considered more fundamental than frequency $f$.
I am not sure what the last equation equating to twice the kinetic energy of the electron (KE) is about. $E = pc$ is the relationship of photon energy to its momentum (the previous is to its frequency). $E = pc$ is actually from special relativity alone and applies to any massless object so also applies to a bulk light wave, it is not specifically quantum mechanical. The other energy-frequency relationships above are, however, as evidenced by the presence of $h$ in them, since photons are specifically part of quantum theory. (Rules of thumb: if an equation has $h$ or $\hbar$, quantum theory is involved somewhere. If it has $c$, relativistic theory is involved somewhere. If $G$ then gravitation or general relativity is involved somewhere.)