The drawing shows an ideal gas confined to a cylinder by a massless piston that is attached to an ideal spring. Outside the cylinder is a vacuum. The cross-sectional area of the piston is A = 2.50 × 10-3 m2. The initial pressure, volume, and temperature of the gas are, respectively, P0, V0 = 6.00 × 10-4 m3 and T0 = 273 K, and the spring is initially stretched by an amount x0 = 0.091 m with respect to its unstrained length. The gas is heated, so that its final pressure, volume, and temperature are Pf, Vf and Tf and the spring is stretched by an amount xf = 0.12 m with respect to its unstrained length. What is the final temperature of the gas?
I don't know how to set this up in order to solve it. Please help!