Approach 2: Define the system as the box-earth. The work done by the person should equal the potential energy gain of the box-earth system. That's mgh, where h is the 2.5 m vertical displacement (i.e. 5 m times sine of 30 degrees). The work done is thus (20 kg)(10 N/kg)(2.5 m) = 500 J.
Which is correct?
Neither. But the problem is ill-posed.
The easiest way to see the ill-posediness is to try to draw an energy bar chart. Let's use the box-earth system.
The gravitational potential energy bars are easy - from zero at the bottom of the ramp to something at the top.On an energy bar chart, conservation of energy is written by equating the number of bars on the left plus the bars of work done by an external force with the number of bars on the right - I describe the process in this video as "bars plus bars equal bars." Right away, you can see why the problem is ill-defined! What's going on with the kinetic energy?
We could assume constant speed. Then the bar chart shows that we need the same amount of work done by the person as the gravitational energy at the top of the ramp. That's a totally reasonable assumption! This gives the work done by the person as 500 J, as in approach 2.
But then what of approach 1? The 150 N force applied over 5 m does give 750 J of work done! But that would cause the box to have 250 J of kinetic energy at the top of the ramp! Is that okay? Well, sure, but wouldn't the box fly off the top of the ramp, then?! I suppose, the problem said the person "can" exert 150 N of force, so perhaps the person is applying less force than they "can"?!? But then I'm sounding like a lawyer, so by definition I'm wrong!!!
Creating multiple exclamation points in a blog post means the problem is ill posed. Now, "ill-posed" doesn't mean "One student personally can't figure out the answer." Were such a problem to accidentally show up on an in-class or standardized exam, I'd expect a student to explain the issue in writing - not to come to the front of the room to argue with the proctor.
Most frequently, this sort of question asks the minimum amount of work the person needs to do to bring the box to the top of the ramp without specifying the force applied by the person. Then the assumption of constant speed is not just reasonable but required to find the minimum work. It's the additional specification of the force of the person on the box that causes the issue.
That doesn't mean this scenario couldn't be used for a well-posed problem! "Explain why this problem is unsolvable without knowing how the box changes speed on the ramp" would be an excellent question. Or, remove the "frictionless" statement, specify that the block is at rest at the bottom and the top, and ask for a justification of whether the ramp is frictionless or not.