I understand how the -x turns into (-1)x. How does 1-x turn into (-1)(x-1)?

Put it this way, you can interpret it as (1-x) is divided by -1

(1-x) = (-x +1 ) just switching position keeping the signs

(-x+1)= -1(x-1 )

I still don’t understand…

Oh thank you Kremlin! Got it.