Solution: Energy to lift a weight is calculated as:
E = mgh
Here height, h is same for a box so energy will be same.
However, power is different as it is defined as the rate of energy to do work. Since the second man takes a shorter time for the same amount of work, he has greater power and does work faster.