<s>[INST] Given that $P(x)$ is a polynomial such that $P(x^2+1) = x^4+5x^2+3$, what is $P(x^2-1)$? How would I go about solving this? I can't find a clear relation between $x^2+1$ and $x^4+5x^2+3$ to solve $P(x^2-1)$.
 [/INST] Here is essentially
division by $x^2+1$
that is just
plug and grind.
$\begin{array}\\
x^4+5x^2+3
&=x^4+x^2+4x^2+3\\
&=x^2(x^2+1)+4x^2+4-1\\
&=x^2(x^2+1)+4(x^2+1)-1\\
&=(x^2+4)(x^2+1)-1\\
&=(x^2+1+3)(x^2+1)-1\\
&=(x^2+1)^2+3(x^2+1)-1\\
\end{array}
$
so,
as 
José Carlos Santos got,
$P(x)=x^2+3x-1$.
Then
$P(x^2-1)
=(x^2-1)^2+3(x^2-1)-1
=x^4-2x^2+1+3x^2-3-1
=x^4+x^2-3
$.
</s>