If $P_n(x)=\sum_{k=0}^{[(n-1)/2]}(-1)^k\ _nC_{2k+1}\ x^k$, find $A(x)$ and $B(x)$ such that $P_{n+2}(x)=A(x)P_{n+1}(x)+B(x)P_n(x)$ A high school math problem:

For $n \in N$ (the natural number set), let us define the polynomial $P_n(x)$ as follows:
$$P_n(x) = \sum_{k=0}^{[(n-1)/2]}(-1)^k \ {}_nC_{2k+1} \ x^k$$
where $[(n-1)/2]$ represents the greatest integer that does not exceed $(n-1)/2$.
Find the expressions for the polynomials $A(x)$ and $B(x)$ such that for all $n \in N$
$$P_{n+2}(x) = A(x)P_{n+1}(x) + B(x)P_n(x)$$

Someone has said it should start from rearranging the formula and stating that
$$P_n(x) = \frac{(1+i \sqrt{x})^n - (1-i \sqrt{x})^n }{2i\sqrt{x}}$$
And from here I am able to do the rest of the steps. But I do not see intuitively how I can reach this expression.

We obtain
\begin{align*}
\color{blue}{P_n(x)}&\color{blue}{=\sum_{k=0}^{\left\lfloor\frac{n-1}{2}\right\rfloor}(-1)^k\binom{n}{2k+1}x^k}\tag{1}\\
&=\sum_{k=0}^{\left\lfloor\frac{n-1}{2}\right\rfloor}i^{2k}\binom{n}{2k+1}\left(\sqrt{x}\right)^{2k}\tag{2}\\
&=\frac{i\sqrt{x}}{i\sqrt{x}}\sum_{k=0}^{\left\lfloor\frac{n-1}{2}\right\rfloor}i^{2k}\binom{n}{2k+1}\left(\sqrt{x}\right)^{2k}\\
&=\frac{1}{i\sqrt{x}}\sum_{k=0}^{\left\lfloor\frac{n-1}{2}\right\rfloor}\binom{n}{2k+1}\left(i\sqrt{x}\right)^{2k+1}\\
&=\frac{1}{2i\sqrt{x}}\left[\sum_{k=0}^{n}\binom{n}{k}\left(i\sqrt{x}\right)^{k}-\sum_{k=0}^{n}(-1)^k\binom{n}{k}\left(i\sqrt{x}\right)^{k}\right]\tag{3}\\
&\,\,\color{blue}{=\frac{1}{2i\sqrt{x}}\left[\left(1+i\sqrt{x}\right)^n-\left(1-i\sqrt{x}\right)^n\right]}\tag{4}
\end{align*}
and the claim follows.
Comment:

*

*In (1) we use for convenient notation $\binom{n}{k}:=_nC_{k}$.


*In (2) we use the identities $i^2=-1$ and $x=\left(\sqrt{x}\right)^2$.


*In (3) we represent the terms with odd index $2k+1$ as sum of all terms minus the terms with even index $2k$. Note, we have to divide by $2$ since we add the odd terms twice.


*In (4) we apply the binomial theorem twice.
