if you have the formula W=Fd, where W=work, F=force, and d=displacement, how do you find W if you don't have F, but you have a mass and displacement?

If the object is being pulled vertically at constant velocity, F = M g

If it is being pulled along a surface with friction, you need to know the slope angle and the friction coefficient