We can use the ideal gas law PV=nRT
For the first phase
The starting temperature (T1) is 273.15K (0C). n is 1 mole, R is a constant, P = 1 atm, V1 is unknown.
The end temperature (T2) is unknown, n= 1 mol, R is a constant, P = 3*P1= 3 atm, V2=V1
Since n, R, and V will be constant between the two conditions: P1/T1=P2/T2
or T2= (P2*T1)/(P1) so T2= (3 atm*273.15K)/(1 atm)= 3*273.15= 816.45K
For the second phase:
Only the temperature and volume change while n, P, and R are constant between the start and finish.
So: V1/T1=V2/T2 While we don't know the initial volume, we know that V2=2*V1 and T1=816.45K
So T2=(V2*T1)/V1= (2*V1*T1)/V1=2*T1= 2*816.45K= 1638.9K
To find the total heat added to the gas you need to subtract the original amount of heat so
1638.9K-273.15K= 1365.75K