Answer
It will take a minimum time of 245 seconds to do this work.
Work Step by Step
We can find the total amount of work the man must do:
$Work = 50\times mgh = (50)(10.0~kg)(9.80~m/s^2)(2.00~m) = 9800~J$
We can find the time it takes to do this work:
$t = \frac{Energy}{Power} = \frac{9800~J}{40.0~W} = 245~s$
It will take a minimum time of 245 seconds to do this work.