Its is given initially the separator in is equilibrium, thus pressure on both sides of the gas is equal say, is `P_(i)`. If `A` be the area of cross section of cylinder, number of moles gas in Left and right part, `n_(1)`, and `n_(2)` can be given as
`n_(1) = (P_(i) (10A))/(R(100))`
and `n_(2) = (P_(i) (20 A))/(R (400))`
Finally if separator to right by a distance `x`, we have
`n_(1) = (P_(f) (10 + x) A)/(RT_(f))`
and `n_(2) = (P_(f) (20 - x) A)/(RT_(f))`
Here `P_(f)` and `T_(f)` are final pressure and temperature both sides after a long time.
Now if we equate the ratio of mole `n_(1)//n_(2)` in initial and final states, we get
`(n_(1))/(n_(2)) = ((10 A // 100))/((20 A // 400)) = ((10 + x) A)/((20 - x) A)`
`2 (20 - x) = 10 + pi`
`x = 10 cm`
Thus in final state when gases in both parts are in thermal equilibrium, the piston is displaced `10 cm` rightward from its initial position.