Because the heating pressure inside is not changed, let inside pressure be `rho`. Then for equilibrium of the systme.
`P (A_(1) - A_(2)) = P_(0) (A_(1) - A_(2)) + (m_(1) + m_(2)) g`
`P Delta V = (rho_(0) Delta A + mg) l`
`l` is the displacement of the piston.
`P Delta V = nR Delta T`
`Delta T = (P Delta V)/(n R) = ((rho_(0) Delta A + mg) l)/(n R)`
`= ((10^(5) Pa xx 10^(-3) m^(2) + 5 xx 10) (50 xx 10^(-2)))/(1 xx R)`
`Delta T = (75)/(R ) K`