Let $d$ be a square free integer and $p$ an odd prime, prove that if $\mathbb{F}_p[X]/(X^2-d)$ has a nilpotent element, then $X^2-d$ is a square in $\mathbb{F}_p[X]$.
It should be an equivalence, the other implication is very simple to prove. However, this implication is causing me a lot of problems.
Ok so through the relation that $X^2=d$ in $\mathbb{F}_p[X]/(X^2-d)$, we have that every element can be written as $aX+b$, with $a,b \in F_p$. The fact that $\mathbb{F}_p[X]/(X^2-d)$ contains a nilpotent element implies the existence of $aX+b$ and $n$ integer such that $aX+b\neq 0$, i.e. $aX+b \notin (X^2-d)$ but $(aX+b)^n\in (X^2-d)$.
How can I use this to deduce that $(X^2-d)$ is a square?