After coming across the problem, I think the solution (and many others on the internet) solve slightly different problems that revolve around information.
One problem I have read is that after picking an envelope you get informed that the other envelope contains either half or double of this envelope. Here you don't know the amount of money in the envelopes. Another problem states, like the one above, that one envelope has a fixed amount, say 10, while the other envelope has double, so 20. I will argue that the solution depends on the information known.
To the onlooker, who knows what's in the envelopes, there is only X for one envelope and 2X for the other. There is no X/2 like in the 2nd paragraph above. He knows the amount is either 10 or 20, but it's never 5 or 40. So the pick becomes relevant. If you pick the 10, by necessity the other envelope holds 20, if you pick the 20, the other envelope by necessity holds 10.
This can be the same for the player if he knows the amounts are fixed. In case A where he picks 10, p=1 that the other envelope holds 20. In case B p=1 that the other envelope holds 10. If we assume no bias from the person asking, both cases are just as likely, getting an EV of 0,5x1x10 + 0,5x1x20 = +15.
The problem changes when the information about the fixed amounts in the envelopes isn't there. This is the problem where, after we pick an envelope, we get told that the other envelope holds either half or double the amount. This is a different problem to my eyes, because I don't have the same information.
Now there are 4 cases:
A. I pick 10, the other envelope is half
B. I pick 10, the other envelope is 20
C. I pick 20, the other envelope is half
D. I pick 20, the other envelope is double.
Now EV for switching will be:
0,25 x 5 + 0,25 x 20 + 0,25 x 10 + 0,25 x 40. I gain EV by switching because of the difference between 0,25 x 5 and 0,25 x 40.
I think the difference in the problems can be explained by the fact that choosing an envelope is actually relevant in the 1st problem. After I choose 1, the other envelope is locked. It's in fact never both double or half, it's always double or always half, but I just don't know which of the cases apply. In the 2nd problem the other envelope isn't fixed as half of the time it is half and half of the time it is double.