Answer
$0$
Work Step by Step
We substitute 1+i into x.
$(1+i)^2-2(1+i)+2$
Take away the parenthesis for the second term.
$(1+i)(1+i)-2-2i+2$
FOIL it.
$1\cdot1+1\cdot{i}+i\cdot1+i\cdot{i}-2-2i+2$
$i\cdot{i}=-1$.
$1+i+i-1-2-2i+2$
Group real and imaginary terms.
$(1-1-2+2)+(1+1-2)i$
Add real and imaginary terms.
$0+0i$
$0$