(Just stumbled on this from two years ago.) I disagree with this reply. In your analysis, what is x when you say "your envelope is either x or 2x". Please identify the variable "x" first. i.e. Start with "let x be ....." It seems you are letting the symbol "x" represent two different things here, two different variables.

But if one says "Let x be the value in the envelope chosen", then it IS correct to say the other envelope either has value x/2 or value 2x, and therefore an expected value of 5x/4. So, change!