\((x-3)^2-(x-1)^3+(x-5)(x+5)+(x+1)\)
\(x^2-6x+9-(x^3-3x^2+3x-1)+(x^2-5^2)+x+1\)
x=1
\(=x^2-6x+9-\left(x^3-3x^2+3x-1\right)+\left(x-5\right)\left(2x+6\right)\\ =x^2-6x+9-x^3+3x^2-3x+1+\left(2x^2-10x+6x-30\right)\\ =-x^3+4x^2-9x+10-2x^2+10x-6x+30\\ =-x^3+2x^2-5x+40\)