But i don't understand how the middle symbol suddenly changes into a minus symbol from a plus symbol
Refer the factorisation question
Because -(1 - 3x) is the same as -1*(1 - 3x), which is -1*1 + (-1)*(-3x)
-1*1 is -1
(-1)*(-3x) = +3x (two minuses make a plus)
So -(1 - 3x) is the same as -1 + 3x (or 3x - 1, which is the same thing with the order changed)