Let $p(x)=x^5+x^2+1$ have roots ${x_1}$, ${x_2}$, ${x_3}$, ${x_4}$ and ${x_5}$. Let $g(x)=x^2-2$, then find the value of $$L=\prod_{i=1}^5 g(x_i)-30 g\big(\prod_{i=1}^5 x_i\big).$$
My attempts were taking an equation whose roots are y = g ( ${x_i}$ ), which is y = $x^2 - 2$ and then substituted x = $\sqrt{y-2}$ in p(x), however im unsure if this is heading in the right direction, any better alternates will be appreciated..