Please help to verify the solution and the contradiction A cylinder is close at both ends and has thermally insulating walls. It is divided into two compartments by a perfectly thermal insulating partition that is perpendicular to the axis of the cylinder. Each compartment contains 1.00 mol of oxygen, which behave as an ideal gas with $\gamma=1.4$. Initially the two compartments have equals volumes, and their temperatures are 550k and 250k. The partition is then allowed to move slowly until the pressure on its two sides is equal. Find the final temperatures in the two compartments.
Let
$p_1$ be the initial pressure and $p_2$ be final pressure in 1st compartment
$p_3$ be the initial pressure and $p_4$ be final pressure in 2nd compartment
$v_1$ be the initial volume and $v_2$ be final volume in 1st compartment
$v_3$ be the initial volume and $v_4$ be final volume in 2nd compartment
$T_1$ be the initial temperature and $T_2$ be final temperature in 2nd compartment
$T_3$ be the initial temperature and $T_4$ be final temperature in 2nd compartment
solving the equation
$p_1v_1^{\gamma}=p_2v_2^{\gamma}$
$p_3v_3^{\gamma}=p_4v_4^{\gamma}$
$p_2=p_4$ and $v_1=v_3$ solve the equation and using PV=nRT obtain $v_2=1.756v_4$ and $T_2=1.756T_4$
Since work done by the adiabatically expanding gas is equal and opposite to the work done by the adiabatically compress gas.
$\frac{nR}{\gamma-1}(T_1-T_3)=-\frac{nR}{\gamma-1}(T_4-T_2)$
$T_2+T_4=T_1+T_3=800k$ and using ratio above get $T_2=510K$ and $T_4=290K$
Contradiction
Since the partition divide it by half, both side occupied volume by 0.5V where V as the total volume of the cylinder, after the partition move x distance from the center, the volume on 1st compartment is equal (0.5+x)V and 2nd compartment(0.5-x)V. Since both side undergo reversible adiabatic process we can take
$T_2=T_1(\frac{0.5}{0.5+x})^{\gamma-1}$ and $T_4=T_3(\frac{0.5}{0.5-x})^{\gamma-1}$
Since there is no energy lost in the system, the sum of temperature on both side should be 800 since it is a measurement of total internal energy of gas on both side in the system and there is no energy lost through the process.
$T_1(\frac{0.5}{0.5+x})^{\gamma-1}+T_3(\frac{0.5}{0.5-x})^{\gamma-1}$
 A: This is a particularly complicated problem to resolve.  We encountered a similar problem on Physics Forums at the end of 2019 and into 2020, and another member named Andrew Mason worked with me to solve it and resolve the inconsistency (which was exactly the same one as in your problem).  Here is a link to the PhysicsForums.com thread:  https://www.physicsforums.com/threads/moving-an-adiabatic-partition-in-an-adiabatic-container.981529/page-2 Please pay particular attention to the developments beginning at post #45 and afterwards.
It looks like in your problem, when they say that "the partition is allowed to move slowly," they mean that you apply a supplementary force to make the partition move slowly.  This is not clear.  But, without supplying a supplementary force, it will not move slowly.  With the supplementary force, you will do work on the partition/system, and the internal energy does not have to stay constant.  So, unless the supplementary force is allowed to be added, the analysis you did will be inconsistent, and the only consistent analysis will be the one we worked out in the Physics Forums thread.
A: Since your question is what we call a "homework and exercise" question, we are not supposed to provide solutions, only guidance with respect to possible conceptual issues the person posting the question has. So here is some guidance.
The equation $pv^γ$= constant applies to a reversible adiabatic process for a closed system of an ideal gas. A closed system is one where there is no exchange of mass between the system and its surroundings. If the gas in each compartment is the system then the gas in the other compartment its surroundings, and vice versa. Since gas is being exchanged between the compartments when the partition is moved, neither compartment qualifies as a closed system.  In short, your use of the equation here for each compartment is inappropriate.
If you are interested in the final equilibrium temperature of the gas, you need only consider that the total internal energy of the combination of compartments equals the sum of the internal energies of the originally separate compartments, as it appears you already know. In this regard, your final statement is correct that there is no energy lost in the system.
However, your statement that the final energy equals the sum of the original temperatures on each side is incorrect. You can't just add the temperatures. Temperature does not equal internal energy. For an ideal gas the internal energy is proportional to the temperature of the gas, times the number of moles of gas. When the compartments are combined you now have 2 moles of gas at the final temperature.
From here, you should be able to figure out what to do.
Hope this helps.
