I don't know what was done to get the line starting with i.e.
For any numbers a and b, $\displaystyle a^2- b^2= (a- b)(a+ b)$
$\displaystyle 3= (\sqrt{3})^2$ so $\displaystyle 3- x^2= (\sqrt{3})^2- x^2= (\sqrt{3}- x)(\sqrt{3}+ x)$
I think that is what you are refering to but, of course, I can't be certain what you mean by "the next line".
$\displaystyle (x-1)(3-x)^2 > x(3-x)(x-1)^2$
$\displaystyle (x-1)(3-x)^2 - x(3-x)(x-1)^2 > 0$
pull out the common factors ...
$\displaystyle (x-1)(3-x)[(3-x) \textcolor{red}{- x(x-1)}] > 0$
distribute ...
$\displaystyle (x-1)(3-x)[3-x \textcolor{red}{- x^2 + x}] > 0$
combine like terms ...
$\displaystyle (x-1)(3-x)(3-x^2) > 0$