
To solve this problem, we need to apply the first law of thermodynamics, which states:
Q = \Delta U + W
where Q is the heat exchanged, \Delta U is the change in internal energy, and W is the work done by the system.
For the entire cycle, using the first law:
Q_{total} = W_{AB} + W_{BC} + W_{CA}
Substituting the given heat exchanges:
40 \, \text{J} + 0 \, \text{J} - 60 \, \text{J} = W_{AB} + (-50 \, \text{J}) + W_{CA}
Simplifying gives:
-20 \, \text{J} = W_{AB} - 50 \, \text{J} + W_{CA}
Since W_{AB} is 0 in this cyclic analysis, resolving gives:
W_{CA} = 30 \, \text{J}
Conclusion: The work done by the gas during CA is 30 J.