The work done by a gas during an isobaric (constant pressure) expansion is given by:
\[
W = P \Delta V
\]
Where:
- \( P = 2 \times 10^5 \, \text{Pa} \) is the pressure,
- \( \Delta V = V_f - V_i = 5 - 2 = 3 \, \text{m}^3 \) is the change in volume.
Substituting the values:
\[
W = 2 \times 10^5 \times 3 = 6 \times 10^5 \, \text{J}
\]
Thus, the work done by the gas is \( 6 \times 10^5 \, \text{J} \).