To elaborate a little further: the 2 problems can be likened to 2 different games. One in which the envelopes hold no clue whatsoever and are shuffled in such a way that nobody knows what's in either envelope and one in which the envelopes are clearly marked and a quizmaster tells us that he knows that the other envelope holds half or double of the envelope we picked.
In the first problem, the EV is actually not 0,5 (2x + (x/2)), because the x's aren't the same. The right way to describe the relation is 0,5 x 2x + 0,5 x (y/2), where y = 2x and x = the amount in the envelope that holds half. After all, it's only half if my envelope holds 2x, and only ever double if my envelope holds x.
In the other problem with marked envelopes and the person asking us to swap knows that the other envelope is either half or double of what is in this envelope, we do get to EV: 5x/4. This time the information is relevant to the envelope we hold.
If we asume no bias because of deception, the solution should be to always swap. When we're playing game 1 it doesn't matter what we do, but in game 2 swapping is +EV. That means we should always swap even when we don't know which of the two games we're playing. Our EV will be p x (5x/4) where p is the chance that we're playing game 2.