The temperature once equilibrium is reached can be found from the following ideal gas law. Initially, we have
n1RT1+n2RT2.
In the equilibrium, we have
(n1+n2)RT.
If pressure and volume did not change, we have
n1RT1+n2RT2=(n1+n2)RT, T=n1+n2n1T1+n2T2=316 K.
Comments