The probability that you have the larger amount is indeed 1/2. The probability that you have the smaller amount is also 1/2. But the joint probability that you have the larger amount *AND* that amount is X is undetermined.
Let me explain with an example. Say I prepare six envelopes. I put a $10 bill inside one, and set it aside. I distribute one $20 bill and four $5 bills between the rest, pick one at random, and give it to you along with the one I set aside. I can now truthfully say "They both contain money, one twice as much as the other."
The probability that you have the smaller envelope is 50%. But this is broken down into a 40% chance that you have $5 and the smaller envelope, a 10% chance that you have $10 and the smaller envelope, and a 0% chance that you have $20 and the smaller envelope. Similarly, there is a 0% chance that you have $5 and the larger envelope, a 40% chance that you have $10 and the larger envelope, and a 10% chance that you have $20 and the larger envelope. If we call the amount in your envelope X, then X is clearly either $5, $10, or $20. BUT THERE IS NO VALUE OF X WHERE THE PROBABILITY THAT X IS THE SMALLER AMOUNT IS THE SAME AS THE PROBABILITY THAT X IS THE LARGER AMOUNT.
If I let you look in your envelope, and you see a $10 bill, there is only a (10%)/(10%+40%)=20% chance that it is the smaller amount. This is called a conditional probability; it found by dividing the probability of the outcome you know ($10) and the outcome you are interested in (smaller) happening together, by the total probability of the outcome you know. Similarly, the chance that it is the larger amount is (40%)/(10%+40%)=80%.
The point is that the solution suggested in the article is wrong. When you assign the unknown X to your amount, you can't use the simple probabilities of picking the smaller or larger envelope. You need to use the joint probability of picking the smaller envelope *AND* the pair containing (X, 2X) with the joint probability of picking the larger envelope *AND* the pair containing (X/2, X). If you don't know the relative likelihoods of (X/2, X) and (X, 2X), you can't make this calculation.
But if you call the total amount in both envelopes 3X, then you don't need to know any relative likelihoods. There is a 50% chance that switching will gain X, and a 50% chance that switching will lose X.