You wan't to know this step:
-2(x-1) = -2x + 2
see, multiply -2 with both x and -1
When you multiply -2 to x it become -2*x = -2x ( minus multiplied by plus = minus)
When you multiply -2 to -1 it becomes (-2) * (-1) = +2 (minus multiplied by minus = plus)
Hence:
-2(x-1) = -2 * x + (-2) * (-1)
= -2x + 2