\hspace{-16}$Let $\mathbf{g(x)=y=x^2-2\Leftrightarrow x^2=(y+2)}$\\\\ Now Given That $\mathbf{x^5+x^2+1=0\Leftrightarrow (x^5)=-(x^2+1)}$\\\\ $\mathbf{x^{10}=x^4+1+2x^2}$\\\\ $\mathbf{(y+2)^5=(y+2)^2+1+2y+4}$\\\\ $\mathbf{y^5+10y^4+40y^3+79y^2+74y+23=0}$\\\\ So $\mathbf{y_{1}.y_{2}.y_{3}.y_{4}.y_{5}=-23}$\\\\ Where $\mathbf{y_{1}\;,y_{2}\;,y_{3}\;,y_{4}\;,y_{5}}$ are the Roots of Given Eq.\\\\ and $\mathbf{x^5+x^2+1=0}$\\\\ So $\mathbf{x_{1}.x_{2}.x_{3}.x_{4}.x_{5}=-1}$\\\\ So $\mathbf{g(x_{1}.x_{2}.x_{3}.x_{4}.x_{5})=(x_{1}.x_{2}.x_{3}.x_{4}.x_{5})^2-2}$\\\\ So $\mathbf{y_{1}.y_{2}.y_{3}.y_{4}.y_{5}-30.(1-2)=-23+30=7}$\\\\ Where $\mathbf{g(x_{i})=y_{i}\forall i=1,2,3,4,5}$
May be some other beautiful Method, So Rishab if you have so plz post here.
Thanks