Ta có
\(x=\frac{\sqrt{4+2\sqrt{3}}-\sqrt{3}}{\left(\sqrt{5}+2\right)\sqrt[3]{17\sqrt{5}-38}-2}\)
\(=\frac{\sqrt{3+2\sqrt{3}+1}-\sqrt{3}}{\left(\sqrt{5}+2\right)\sqrt[3]{5\sqrt{5}-3.5.2+3.4.\sqrt{5}-8}-2}\)
\(=\frac{\sqrt{3}+1-\sqrt{3}}{\left(\sqrt{5}+2\right)\left(\sqrt{5}-2\right)-2}=\frac{1}{5-4-2}=-1\)
Thế vào ta được
\(P=\left(x^2+x+1\right)^{2013}+\left(x^2+x-1\right)^{2013}\)
\(=\left(1-1+1\right)^{2013}+\left(1-1-1\right)^{2013}=1-1=0\)