Work done=F *s*cos theta
Work done in this case can only be in the direction in which the electrons move.Thus cos theta is multiply to find the component of the force ( acting on an object doing work) which acts in the direction of propagation on movement of the object.Anyway,as in this case ,as magnetic field act only perpendicularly (at 90°) to electric fields(those are the electrons)no work is done.This is cause at 90°,there is no component of the magnetic field exiting of force in the direction of propagation of the electric field (electrons),as cos of 90 ° is 0, no work is done by the magnetic field.(as the whole product becomes zero regardless of the force or the displacement/distance