10.5. Let $P(X)$ be a polynomial with real coefficients, such that

$x \cdot P(x+2022)-(x+2023) \cdot P(x)=2022 \cdot x-2023$, for any $x \in \mathbb{R}$. Find the remainder of the division of the polynomial $P(X)$ by the polynomial $Q(X)=X^{2}+X$.
Solution. Suppose the polynomial $P(X)$ satisfies the given relation. Since this equality is true for any real number $x$, for $x=0$, we get $-2023 \cdot P(0)=-2023 \Leftrightarrow P(0)=1$.

For $x=-2023$ we get $-2023 \cdot P(-1)=-2023^{2} \Leftrightarrow P(-1)=2023$.

The remainder of the division of the polynomial $P(X)$ by the polynomial $Q(X)$ will be a polynomial of degree less than 2, i.e., it will have the form $R(X)=a X+b$.

The equality $P(x)=\left(x^{2}+x\right) \cdot C(x)+a x+b$ holds for any real number $x$, in particular for $x=0$ and for $x=-1$.

We obtain the system $\left\{\begin{array}{l}P(0)=0 \cdot C(0)+a \cdot 0+b \\ P(-1)=0 \cdot C(-1)-a+b\end{array} \Leftrightarrow\left\{\begin{array}{l}b=1 \\ 2023=-a+1\end{array} \Leftrightarrow\left\{\begin{array}{l}a=-2022 \\ b=1\end{array}\right.\right.\right.$.

Polynomials that satisfy the relation in the statement exist, for example $P(X)=-2022 \cdot X+1$.

Answer: $-2022 \cdot X+1$