`@` `\text {Ans}`
`\downarrow`
\(B=(x+1)^2-2(2x-1)(1+x)+4x^2-4x+1\)
`= x^2 + 2x + 1 - 2(2x^2 + x - 1) + 4x^2 - 4x + 1`
`= 5x^2 - 2x + 2 - 4x^2 - 2x + 2`
`= x^2 - 4x + 4`
\(B=\left(x+1\right)^2-2\left(2x-1\right)\left(1+x\right)+4x^2-4x+1\)
\(=\left(x+1\right)^2-2\left(x+1\right)\left(2x-1\right)+\left(2x-1\right)^2\)
\(=\left(x+1-2x+1\right)^2\)
\(=\left(2-x\right)^2\)