Answer
See the attachment below.
Work Step by Step
Step 1: We assume the Ar gas to be an ideal gas. In all of the three parts, the change of internal energy (ΔU) would all be zero because it is isothermal. As we know, internal energy for ideal gases only depends on temperature.
Step 2: Let’s compute the work (w) as shown by the attached document. Notice: at part (a), in a reversible process the external pressure (Pext) at each moment is equal to the system pressure (P), so the change of P is infinitesimally small. It’s unlike in an irreversible process where (Pext) is not equal to P, so P is adjusted significantly so that P can be equal Pext. In part (b), the final pressure that Pext equal to is calculated using ideal gas equation PV=nRT.
Step 3: According to the first law of thermodynamics, ΔU=q+w, for all three parts ΔU=0, so
q=-w.