From a physics perspective, if you want to move a box a distance D, or from a point X to a point Y, you have to exert A force on that box over a distance D.
And assuming the force is constant, you can find the work done by this formula.