That's not quite right.

If you assume x is the amount in your current envelope, switching will either double your money to 2x, or halve it to x/2, leading to an expected gain when switching as shown in the article.

You need to look a little deeper and think about what the implications are of saying that for any x the envelope has either x or 2x with equal probability.