`a)`\(\left(x+3\right)^2-x^2\left(x+1\right)=\left(3-x\right)\left(9+3x+x^2\right)\)
\(\Leftrightarrow x^2+6x+9-x^3-x^2=27-x^3\)
\(\Leftrightarrow6x=18\)
`<=>x=3`
Vậy `x=3`
`b)(x+1)^2-4(x+1)(x-3)+4(x-3)^2=0`
`<=>x^2+2x+1-4(x^2-3x+x-3)+4(x^2-6x+9)=0`
`<=>x^2+2x+1-4x^2+8x+12+4x^2-24x+36=0`
`<=>x^2-14x+49=0`
`<=>(x-7)^2=0`
`<=>x=7`
Vậy `x=7`