A closed cylinder is divided into two rooms by a frictionless piston held in place by a pin, as shown in Fig. P5.138. Room A has 10 L air at 100 kPa, 30°C, and room B has 300 L saturated water vapor at 30°C. The pin is pulled, releasing the piston, and both rooms come to equilibrium at 30°C and as the water is compressed it becomes two-phase. Considering a control mass of the air and water, determine the work done by the system and the heat transfer to the cylinder.