Let V1,V2 are the volume of two system
Now,
V1+V2=V=0.025m3
As both system are in closed container in adiabatic condition
T1=175K,T2=400K
we know that, PV=nRT
P1nRT1+P2nRT2=PnRT
P2R×175+P1.5R×400=P3.5RT
T= 270.42 K, This is the final temeprature