<s>[INST] Cannot figure out step in solving equation I am reading calculus made easy by Silvanus P. Thompson (1914) and in it the following example was given [p.29 - p.30]:  
Find the differential coefficient of $y$ with respect to $x$
$$
ay + bx = by - ax + (x+y)\sqrt{a^2 - b^2}
$$
This is given as an example and is immediately worked out, but I fail to understand a step that the author performed. I quote the solution:  
1)
$$
(a-b)y+(a+b)x = (x+y)\sqrt{a^2 - b^2}\\
$$
2)
$$
(a-b)^2y^2 + (a+b)^2x^2+2(a+b)(a-b)xy = (x^2+y^2+2xy)(a^2-b^2)
$$
3)
$$
(a-b)^2y^2+(a+b)^2x^2=x^2(a^2-b^2)+y^2(a^2-b^2)
$$
4)
$$
\lbrack(a-b)^2-(a^2-b^2)\rbrack y^2 = \lbrack(a^2-b^2)-(a+b)^2\rbrack x^2
$$
5)
$$
2b(b-a)y^2 = -2b(b+a)x^2
$$
6)
$$
y = \sqrt{\frac{a+b}{a-b}}x 
$$
And finally
$$
\frac{dy}{dx} = \sqrt{\frac{a+b}{a-b}}
$$
The step that I do not understand is the transition from (2) to (3). Namely, where did $2(a+b)(a-b)xy$ (left side) go? And $(x^2+y^2+2xy)$ (right side)?
(the title of this question is probably inappropriate, but I fail to come up with a more appropriate one. I also don't know which tags I should file this question under. Very sorry for the inconvenience)
 [/INST] $$(a-b)^2y^2 + (a+b)^2x^2+\color{blue}{2(a+b)(a-b)xy} = (x^2+y^2+2xy)(a^2-b^2)$$
$$(a-b)^2y^2+ (a+b)^2x^2+ \color{blue}{2(a^2-b^2)xy} =(x^2+y^2)(a^2-b^2)+\color{blue}{2xy(a^2-b^2)}$$
$$(a-b)^2y^2+ (a+b)^2x^2+ \require{enclose}\enclose{updiagonalstrike}{\color{blue}{2xy(a^2-b^2)}} =(x^2+y^2)(a^2-b^2)+\require{enclose}\enclose{updiagonalstrike}{\color{blue}{2xy(a^2-b^2)}}$$
The rest is group the terms with $x^2$ and $y^2$
</s>