Work performed by a gas during an isobaric process (constant pressure) is calculated using the formula:
\[
W = - P \Delta V
\]
In this formula:
- \( W \) represents the work done by the gas.
- \( P = 1 \times 10^5 \, \text{Pa} \) is the constant pressure.
- \( \Delta V = V_f - V_i = 2 - 5 = -3 \, \text{m}^3 \) is the change in volume.
Consequently, the work done is:
\[
W = - (1 \times 10^5) \times (-3) = 3 \times 10^5 \, \text{J}
\]
The negative sign signifies compression of the gas. Therefore, the work done *by* the gas is \( -3 \times 10^5 \, \text{J} \).