Hi, Can you please show me the step-by-step process of this example. Especially the second and third line?

Here is the given:

$\displaystyle (xy-x)dx=(x^2y^2-x^2)+(y^2-1)dy$

$\displaystyle x(y-1)dx=(x^2(y^2-1)+(y^2-1))dy$

$\displaystyle =(x^2+1)(y^2-1)dy$

$\displaystyle xdx=(x^2+1)(y+1)dy$

Any help will be appreciated, thanks