James M. answered 01/13/21
Master Physics Instructor who has a track record of success
Work, W, equals force times distance cosine of the angle between the force and the distance.
Friction equals µFn , in this case Fn = mg because floor is horizontal, so work done by friction Wf
Wf = µmg x d cos 180° = [(0.21)(50)(9.8) x 40 (-1) = -4,116 J
work done by applied force, Fa
WFa = 300 x 40 x (1) = 12,000 J
Work done by gravity, Wg = 0 since cos 90° = 0
Total work, WT = WFa + Wf = 12,000 + (-4,116) = 7,884 J