Explanation :
It is given that,
Force acting on Ivan,

Height of the basket above the ground, s = 2 m
Work done in this case would be :

Where
is the angle between the force and the displacement and it is equal to 0.
So,


Ivan does work when he lifts the basket and it is equal to 40 J.
When he carries the basket 5 m across a room to place it on a shelf, then his weight is acting vertically downwards. The angle between the force and the displacement is now 90.
So, the work done he does is 0.