Ta có: \(x=2-\sqrt{3}\)\(\Rightarrow2-x=\sqrt{3}\)\(\Rightarrow\left(2-x\right)^2=3\)\(\Rightarrow4-4x+x^2=3\)\(\Rightarrow x^2-4x+1=0\)
Lại có: \(B=x^5-3x^4-3x^3+6x^2-20x+2018\)
\(\Rightarrow B=x^5-4x^4+x^4+x^3-4x^3+5x^2+x^2+20x+5+2013\)
\(\Rightarrow B=\left(x^5-4x^4+x^3\right)+\left(x^4-4x^3+x^2\right)+\left(5x^2-20x+5\right)+2013\)
\(\Rightarrow B=x^3\left(x^2-4x+1\right)+x^2\left(x^2-4x+1\right)+5\left(x^2-4x+1\right)+2013\)
\(\Rightarrow B=x^3\cdot0+x^2\cdot0+5\cdot0+2013=2013\)