Method 1 is correct, and method 2 is incorrect.
The work done by the system on the surroundings, whether the process is reversible or irreversible, is always given by dw = P
IntdV, where P
Int represents the force per unit area at the interface between the system and the surroundings. For the irreverisble process you described, if you do a force balance on the piston, you get ##P_{Int}A-mg=m\frac{dv}{dt}##, where v is the velocity of the piston and A is the area of the piston. If you multiply this equation by v = dx/dt (where x is the displacement of the piston), and integrate with respect to time from t = 0 to t = t, you get:
$$W(t)=\int_0^t P_{Int}(t)A\frac{dx}{dt}dt = \frac{mg}{A}[V(t)-V(0)] + m\frac{v^2(t)}{2}$$
where W(t) is the cumulative work done by the gas on the weight up until time t, and V(t) is the volume of the gas during the irreversible expansion at time t. I hope you realize that, even if the piston is frictionless, the weight will oscillate up and down about its final equilibrium position, but eventually it will come to rest because of viscous damping by the gas. So, at very long times, the total amount of work done by the piston on the surroundings will be:
$$W(∞)= \frac{mg}{A}[V(∞)-V(0)] $$
But mg/A is the final pressure exerted by the piston on the gas after the system has re-equilibrated, so
$$W(∞)= P(∞)[V(∞)-V(0)] $$
This confirms your result from Method 1.
Method 2 is not correct because the gas force per unit area on the piston face during the reversible expansion will not be equal to the thermodynamic pressure determined by the ideal gas law. This is because, in a rapid irreversible expansion, viscous stresses will also be present in the gas, which will alter the force per unit area at the piston face. At a given gas volume, for an irreversible expansion, the force per unit area will be less than one would be calculate from the ideal gas law.
For more on this, please see my recent Physics Forums Insights article at
https://www.physicsforums.com/insights/understanding-entropy-2nd-law-thermodynamics/, particularly the section on the first law of thermodynamics. There are also two open threads that other members and I have been involved with to analyze problems like this one, and which may interest you:
https://www.physicsforums.com/threa...eversible-expansion-mean.812804/#post-5104268
and
https://www.physicsforums.com/threa...n-adiabatic-process-and-heat-capacity.796304/
See posts beginning with #15.
Chet