How do you simplify 2x-4x+2?

$2 x - 4 x + 2 = 2 \left(1 - x\right)$
$2 x - 4 x + 2 = \left(2 x - 4 x\right) + 2 = - 2 x + 2 = 2 \cdot \left(- x\right) + 2 \cdot 1 = 2 \left(- x + 1\right) = 2 \left(1 - x\right)$