if on earth and g = 9.81 m/s^2
then
potential energy gained = m g h = 5 * 9.81 * 2 = 98.1 Joules
------------------------------------------------------------------------------
HOWEVER it could be more complicated if the thing went up with constant acceleration. In that case it also gained kinetic energy and we need the speed at the top.
v = 0 + a t
h = 0 + 0 + (1/2) a t^2
2 = (1/2) a * 9
a = 4/9
so
v = (4/9) (3) = 4/3 meters/second at height = 2
Ke = (1/2) m v^2 = (1/2) * 5 * 16/9 = 40/9 = 4.44 Joules
in that case 98.1 + 4.4 = 102.5 Joules
I have no idea if the question writer meant for you to do that kinetic energy part
A black of mass 5kg is lifted 2m in 3 seconds find the work done
2 answers
work = force * distance = mgh