Resultant temperature of mixture
In the first condition when both flasks are boiling, the temperature of the gases in both flasks are the same (100 &deg;C).  Using the ideal gas law on the system that comprises both flasks, where $n$ is the number of moles initially in each flask and $V$ is the volume of one flask.

$$ P_{init} = \frac{(2 n) R\;T_{boil}}{2 V} = \mathrm{0.5~atm}$$

$$ 2n = \frac{P_{init}(2 V)}{R\;T_{boil}} $$

Now if Flask #2 is immersed in ice water, we should assume that the pressure in the system will be constant but that the flasks will have different temperature.  For the pressure to be constant at different temperatures, material will have to flow from the hot flask to the cold flask; now, $n_1$ and $n_2$, the moles of gas in flask #1 and flask #2, will not be the same, but since no gas leaves the system comprising both flasks, then we know $n_1 + n_2 = 2n$

$$ n_1 = \frac{P_{final}V}{R\;T_{boil}} $$
$$ n_2 = \frac{P_{final}V}{R\;T_{ice}} $$
$$ n_1 + n_2 = 2n$$

Substituting:

$$ \frac{P_{final}V}{R\;T_{boil}} + \frac{P_{final}V}{R\;T_{ice}} = \frac{P_{init}(2 V)}{R\;T_{boil}}$$

$$ P_{final}\frac{V}{R}\left(\frac{1}{T_{boil}} + \frac{1}{T_{ice}} \right)= 2 \frac{P_{init}V}{R\;T_{boil}}$$

$$ P_{final}\left(\frac{1}{T_{boil}} + \frac{1}{T_{ice}} \right)= 2 \frac{P_{init}}{T_{boil}}$$

$$ P_{final} = 2 P_{init}\frac{\frac{1}{T_{boil}}}{\left(\frac{1}{T_{boil}} + \frac{1}{T_{ice}} \right)} = 2 P_{init} \frac{\frac{1}{T_{boil}}}{\frac{T_{ice} + T_{boil}}{T_{ice}{T_{boil}}}}$$

$$ P_{final} = 2 P_{init} \frac{T_{ice}}{T_{ice} + T_{boil}}  $$

This answer makes sense in that (i) if the temperature $T_{ice}$ is actually the same as $T_{boil}$, then the final pressure would be the same as the initial pressure, and (ii) the answer doesn't depend on the volume or moles of gas in the flasks, just the temperatures and the initial pressure.


  Way 1: Net Temperature of the system should be 50 degree Celsius because there is no heat loss and there is symmetry.


This way is incorrect because a flask immersed in boiling water ($T=$100&deg;C) is unlikely to have a temperature of 50 &deg;C.  Similarly for a flask immersed in ice.


  Way 2: The sum of the moles of gas in both the flasks would remain same. 


This is the correct method.  It does require assuming that the rate of heat transfer from the boiling / ice baths to the flasks is much much greater than the rate of heat transfer between flasks via diffusion through the tube.  However since the tube is small, this assumption is probably OK.