Where can you perform variable substitution in an equation? I've ended up in a debate on a proof for .999˜ being equal to 1 (in the real number system.)  I think the arguments have boiled down to whether or not we can preform variable substitution on one side of the equation, while keeping that variable rather than substituting it on the other side of the equation.
What we are looking at:
Given: x = 0.999˜ (Using the ˜ symbol to represent repeating)
    .. A
    10x - x     = 9.999˜ - x
    9x          = 9.999˜ - x
    9(.999˜)    = 9.999˜ - (.999˜)
    8.999˜      = 9
    ..
    OR
    .. B
    10x - x     = 9.999˜ - x
    9x          = 9.999˜ - (0.999˜) // Preform a substitution on ONLY the RHS
    9x          = 9
    x           = 1
    ..
What's so confusing is that both should be right...since 8.999˜ IS equal to 9.  But, since this is a proof you should expect the same representation of the number at the most simplified step (I believe?)
So for simplicity sake my questions are...:


*

*Is the algebra valid in both examples A and B?

*Does example A act as proof regardless of giving different representations of the same number at the most simplified step?

 A: (Yes: decimal representations of some real numbers are not unique; any number with terminating decimal representation has two representations: one that terminates, and one that does not.)
In both procedures, the real difficulty lies in justifying the step from
$$9.999\overline{9} - 0.999\overline{9}$$
to $9$. The problem is not the substitution, the problem is the justification for that difference. In $A$, there is the additional problem of justifying the step that goes from $9(9.999\overline{9})$ to $8.999\overline{9}$.
Note also that in A you are not finding the value of $x$, you are finding something else. So you are not getting "two different representations of the same number". You didn't get a value for $x$ in A.
The reason why the steps mentioned above are troubling: 
If you are justifying the step that goes from $9.999\overline{9} - 0.999\overline{9}$ to $9$  in terms of the algorithm for computing differences of numbers written in decimal notation, you are going to run into a serious problem: the algorithm says, as its first step, to start at the rightmost digit of the two numbers. But neither of these numbers has a "rightmost digit", so the algorithm for computing differences does not apply.
If you are not justifying the step in terms of that algorithm, then how are you justifying it?
Likewise, the algorithm for computing $9\times 9.999\overline{9}$ requires you to perform infinitely many products; in all steps you have a "carry", so the procedure never ends. On what grounds can you call the computation "finished"?
The steps can be justified, but not by basic arithmetic. You end up talking about infinite series and limits. 
