Pressure of two flasks connected to each other at different temperatures
The easiest way to prove the equality in pressure is by taking a cross-section of the narrow tube and finding the forces acting on it. By extending this, we can prove that the pressures are equal.
Take a cross-section area of the narrow tube. We assume this is at steady state and there is no average motion of particles in the entire system.
Now, since there is no net average motion, this means that there is no pressure gradient across any cross-section. Expanding this cross-section into the tube, we see that the ends of the tube have to be at the same pressure since there is no net average motion of the gas within the two flasks at steady state (which is where the parameters are asked to be measured).
Therefore $$p_\mathrm{left} = p_\mathrm{right}$$