Your math is right, but there's more to the story here, specifically to understand why the switching argument is wrong - this is commonly misunderstood, and has more to do with the implied "fairness" of the putting-numbers-in-the-envelope process than the calculation of the odds afterwards.
The super quick version: the number drawing process can't be fair, and that makes those .5/.5 hi/low probabilities wrong in general.
The real impossibility is the idea that we can "pick a random number" such that all numbers are equally probable, with no constraints on the size of that number. If this isn't intuitively obvious, then just try to normalize a uniform probability distribution over the positive real line, you'll see the problem.
In order to select the two amounts, the original problem statement implies that we need to randomly pick A (which we can take as the bigger envelope) in exactly such a way, so basically, the "paradox" is dead-on-arrival, because the true prior distribution that A was picked from must be different - for example, there might be an upper bound, say $100, in which case if we see that our envelope has any number over $50 on it, we are 100% sure that we hold the larger envelope. Otherwise, without some bounds or tapering of the distribution, we can't normalize it, and we can't use it to draw numbers from, so we have no numbers in envelopes to even discuss.
tl;dr version: If you can write me an algorithm that "randomly selects a number" (let's even make it an integer to make it even simpler - of course I mean an Actual Integer, not those short bit sequences that we pretend are integers when we program), such that no integer is more likely to be chosen than any other, then I've got two envelopes that I'd like to show you. :)
On another note, the truly insane might notice that in the same way that we can formally sum series like 1+2+3+... = -1/12 (http://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%C2%B7%...), and 1+1+1+... = -1/2 (http://en.wikipedia.org/wiki/1_%2B_1_%2B_1_%2B_1_%2B_%C2%B7_...), we might consider the probabilistic analogues of these formulas, and "formally normalize" a PDF that is uniform over the positive integers, with a constant probability of -2 for every integer (whatever that means). Similar things could be tried over the real numbers, though it gets messier because the integral analogues of those formal sums tend to come out to zero (for instance, for any integer n, the integral of x^n from 0 to infinity, in a very specific sense, is zero - perhaps I'll do a layman's post on this phenomenon at some point, it's quite useful in some cases), so normalization doesn't really work out so well.
Of course, probabilities can't be negative under the usual rule set, so all of that would be pointless, wouldn't it? :)
The super quick version: the number drawing process can't be fair, and that makes those .5/.5 hi/low probabilities wrong in general.
The real impossibility is the idea that we can "pick a random number" such that all numbers are equally probable, with no constraints on the size of that number. If this isn't intuitively obvious, then just try to normalize a uniform probability distribution over the positive real line, you'll see the problem.
In order to select the two amounts, the original problem statement implies that we need to randomly pick A (which we can take as the bigger envelope) in exactly such a way, so basically, the "paradox" is dead-on-arrival, because the true prior distribution that A was picked from must be different - for example, there might be an upper bound, say $100, in which case if we see that our envelope has any number over $50 on it, we are 100% sure that we hold the larger envelope. Otherwise, without some bounds or tapering of the distribution, we can't normalize it, and we can't use it to draw numbers from, so we have no numbers in envelopes to even discuss.
tl;dr version: If you can write me an algorithm that "randomly selects a number" (let's even make it an integer to make it even simpler - of course I mean an Actual Integer, not those short bit sequences that we pretend are integers when we program), such that no integer is more likely to be chosen than any other, then I've got two envelopes that I'd like to show you. :)
On another note, the truly insane might notice that in the same way that we can formally sum series like 1+2+3+... = -1/12 (http://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%C2%B7%...), and 1+1+1+... = -1/2 (http://en.wikipedia.org/wiki/1_%2B_1_%2B_1_%2B_1_%2B_%C2%B7_...), we might consider the probabilistic analogues of these formulas, and "formally normalize" a PDF that is uniform over the positive integers, with a constant probability of -2 for every integer (whatever that means). Similar things could be tried over the real numbers, though it gets messier because the integral analogues of those formal sums tend to come out to zero (for instance, for any integer n, the integral of x^n from 0 to infinity, in a very specific sense, is zero - perhaps I'll do a layman's post on this phenomenon at some point, it's quite useful in some cases), so normalization doesn't really work out so well.
Of course, probabilities can't be negative under the usual rule set, so all of that would be pointless, wouldn't it? :)