A rigid tank initially contains 2 kg of steam at 500 kPa and 350°C. The steam is then cooled until it is at 100°C. Determine the final pressure and the heat transferred during this process.