Your envelope has either x or 2x with equal probability or an expected value of 1.5x. If you have x and switch you get 2x and if you have 2x and switch you get x, each with equal probability --- you still have an expected value of 1.5x. So, no advantage or disadvantage in switching.