Considering Air inside the cylinder as the system Total work by gas = work done by the spring + work done by weight of piston + Work done by atmosphere Work done by spring =
1
2
k(x22−x12) =
1
2
×12.5×103×(0.08)2 =40J Work done by atmosphere = Patm × volume =100×103×0.03×0.16 =480J Work done by weight of piston: At initial state Pinitial × Area =Patm × Area +Wpiston 105×103=100×103+
Wpiston
0.03
Wpiston =150N Work done by piston (Wpiston )=150×0.16=24 Joule So Total work done by gas =40+480+24 =544 Joule