Step 1: Plan the area-under-the-line idea.
On a $P-V$ graph the work done equals the area under the path. For a straight line that area is just the average pressure times the change in volume.
Step 2: Find the two end pressures.
Use $P = nRT / V$ with $n = 1$ and $R = 8.314$.
Initial: $P_i = \dfrac{8.314 \times 290}{0.030} \approx 8.04 \times 10^{4}$ Pa.
Final: $P_f = \dfrac{8.314 \times 310}{0.016} \approx 1.611 \times 10^{5}$ Pa.
Step 3: Take the average pressure.
Because the path is a straight line, \[ P_{\text{avg}} = \frac{P_i + P_f}{2} = \frac{8.04 \times 10^4 + 1.611 \times 10^5}{2} \approx 1.207 \times 10^{5}\ \text{Pa}. \]
Step 4: Find the volume change.
\[ \Delta V = 0.016 - 0.030 = -0.014\ \text{m}^3. \]
Step 5: Multiply for the work.
\[ W = P_{\text{avg}} \, \Delta V = 1.207 \times 10^{5} \times (-0.014) \approx -1690\ \text{J}. \]
Step 6: Report the magnitude.
The gas is compressed, so work done on it is positive, but the magnitude asked for is about $1690$ J. \[ \boxed{|W| \approx 1690\ \text{J}} \]