\(x=\frac{1}{2}\frac{\sqrt{\left(\sqrt{2}-1\right)^2}}{\sqrt{\left(\sqrt{2}-1\right)\left(\sqrt{2}+1\right)}}=\frac{1}{2}.\left(\sqrt{2}-1\right)\)
\(\Rightarrow2x=\sqrt{2}-1\Rightarrow2x+1=\sqrt{2}\)
\(\Rightarrow4x^2+4x+1=2\Rightarrow4x^2+4x-1=0\)
\(B=\left[x^3\left(4x^2+4x-1\right)-x\left(4x^2+4x-1\right)+4x^2+4x-1-1\right]^{2018}+2018\)
\(=\left(-1\right)^{2018}+2018=2019\)