Physics doubt

Can someone explain how is the work done by the magnetic field zero here ?

Can someone explain how is the work done by the magnetic field zero here ?