The work done is given by:
\[
W = -P \Delta V
\]
Here, \(P = 3 \, \text{atm}\), \(\Delta V = 6 - 4 = 2 \, \text{dm}^3\). Converting pressure to \( \text{J} \), we use the conversion factor \(1 \, \text{atm} = 101.32 \, \text{J/L}\). Thus, the work done is \(-304 \, \text{J}\).