Mechanical work is defined as the product of a net force applied over a a distance on an object. In order for work to be done, the force must be applied in the direction of motion. The equation is
W = FDcos(X) where Fcos(X) is the component of the force applied at the angle X that maps to the direction of motion. D is the distance that the object moves while the force is applied.
When one is lifting a mass the force that is being applied is that which is required to over come the weight of the object.
The direction of motion is "up" and the force is "up" therefore the angle X is zero, giving the cos(X) = 1
The force is equal to the opposite of the weight: F = -w
F = -mg = -5.0kg(-9.8m/s^2) = 49 N
This gives a work of
W = 49N*2.0m = 98 Nm or 98 joules.