2(x+1)²-4(x+1)(x-1)+3(x-1)².=2(x²+2x+1)-4(x²-1)+3(x²-2x+1)=2x²+4x+2-4x²+4+3x²-6x+3=x²-2x+9
2(x+1)^2-4(x+1)(x-1)+3(x-1)^2=2(x+1)[(x+1)-2(x-1)]+3(x-1)^2=2(x+1)(3-x)+3x^2-6x+3=-2x^2+4x+6+3x^2-6x+3=x^2-2x+9