>> but when i factorised the equation i couldn't get (1-x)^2; i can only get (x-1)^2
If you can get (x-1)^2, then you can realize that :
(x - 1)^2 = (x - 1) * (x - 1) = (x - 1) * (x - 1) * 1
Since -1 * -1 = 1 :
(x - 1) * (x - 1) * 1 = (x - 1) * (x - 1) * -1 * -1 = ((x - 1) * -1) * ((x - 1) * -1) = (1 - x) * (1 - x) = (1 - x)^2
For any positive x :
(-x)^2 = ((-1)^2) * (x^2) = 1 * x^2 = x^2