Solve $ax - a^2 = bx - b^2$ for $x$ Method 1
Solve for x
$$ax - a^2 = bx - b^2$$  
Collect all terms with x on one side of the equation
$$ax - bx = a^2 -b^2$$
Factor both sides of the equation
$$(a -b)x = (a+b)(a - b)$$
Divide both sides of the equation by the coefficient of $x$  (which is $a-b$)
$$x = a + b$$     (where $a \neq b$ since this would mean dividing by $0$)
Method 2
Solve for $x$
$$ax - a^2= bx - b^2$$  
Bring all the terms to one side of the equation
$$ax - a^2 -bx + b^2 = 0$$
Rearrange
$$ax - bx -(a^2-b^2)=0$$
Factor
$$(a - b)x - (a + b)(a - b) = 0$$
$$(a - b)( x - (a + b)) = 0$$
which is a true statement if $$a-b=0$$ $$a = b$$ or $$x-(a+b)=0$$ $$x = a + b$$
My question is I don't understand how this second method is consistent with the first in terms of the restriction on $a$ and $b$.
 A: This is indeed consistent solutions:


*

*note: if $a = b$, you have $0 = 0$ (just put $a = b$ and substitute into the original equation).

*Note, in the first method, you acknowledged that you could not have $a = b$ and validly divide by $(a - b).$ You just forgot to check what happens when $a = b$. 
When $a = b$, we have that any $x$ will solve the equation. That is, $a = b \implies x \in \mathbb R$. That doesn't tell you much! $a = b$ is not itself a solution to $x$. 
A: If $a=b$, the left side of the equation $(a-b)(x - (a+b)) = 0$ is always equal to the right side, so $x$ can be anything.
A: In the first method you come to the equation
$$(a-b)x=(a+b)(a-b)$$
In the second method, you come to the equation
$$(a-b)(x-(a+b))=0$$
which is just the first equation rearranged and factored.  If we divide the first equation by $(a-b)$ without factoring, we still collect the solution $a=b$, because notice that it does solve the first equation.  However, we continue on assuming $a\ne b$ to discover the other solution.
The method is the same with the second equation.  We first collect the solution $a=b$, and then we assume $a\ne b$ to see if there are other solutions.  By the zero product property, it follows that we must have $x=a+b$.
