Work done by the gas and on the gas are two different things.
In your question, the volume is increasing and the pressure is decreasing.
Let's consider some things before making an attempt to answer your question,
For simplification, consider the adiabatic process where $Q=0$.
If the external agent does positive work, the volume always decreases.
But in your question, as the volume is increasing, the external agent isn't the one doing the positive work, its actually the gas because only the gas can expand the system and still do positive work.
In the first law of thermodynamics,
$\mathrm dU=Q-p\,\mathrm dV$,
The term $W$ represents the work done by the external agent.
If the external agent does positive work, volume decreases (i.e, $\mathrm dV$ is negative => $W$ is positive) and the internal energy increases and vice versa.
So, the work done by the gas becomes $-(-p\,\mathrm dV)$, because for a reversible process the work done by external agent and the gas are equal in magnitude and opposite in sign.
Now, as $\mathrm dV$ is positive, work done by the gas in also positive.
As you can see, magnitude wise $W_3$ is the greatest and now we also know that the net positive work is done by the gas because the final volume is greater.
This should answer your question.