The correct answer is metal B.
Given a graph of the kinetic energy of the photoelectron and frequency of light.
The energy of the incident photon is given by the formula,

Where h is Plank's constant, ν is the frequency of light, E_K is the kinetic energy of the photoelectrons, and φ is the work function of the metal.
When a photon is an incident on metal, the photoelectrons will be ejected only if the energy supplied by the light is more than the work function of the metal. Once the energy of light increases beyond work function, as the frequency increases, the kinetic energy of the photoelectrons increases.
Higher the work function higher frequency of light is needed so that the metal will eject the photoelectrons.
Therefore the metal B has a higher work function.