Take CV as the water.
m2 = m1 = m ; m(u2 − u1) = 1Q2 - 1W2
State 1: Compressed liquid, take saturated liquid at same temperature.
v1 = vf(20) = 0.01605 ft3/lbm, u1 = uf = 38.09 Btu/lbm
State 2: v2 = V2/m = 4/2 = 2 ft3/lbm and P = 300 psia
=> Superheated vapor T2 = 600 F ; u2 = 1203.2 Btu/lbm
Work is done while piston moves at linearly varying pressure, so we get

