(a) The direction of motion of the object is opposite the direction of the frictional force, as can be seen. As a result, the work completed is negative.
(b) The frictional force acting on an object moving in a rough horizontal plane is in the opposite direction as the motion. A uniform force is supplied to the object to maintain a uniform velocity. As a result, the object’s motion and the applied force are both in the same direction. As a result, the work completed is positive.