If a man has an average useful power output of 31 W, what is the minimum time, in s, it would take him to lift fifty 12.3 kg boxes a height of 2.3 m.

i'm thinking i should find the work done then find power with p = work/time

Yes, that is how to do it. You will rearrange the last formula to give

time = work/power

The work is 50*12.3*g*2.3
= 1.386*10^4 J

It will take about 1 1/4 hours.