3. Find $g(2022)$, if for any real $x, y$ the equality holds

$$
g(x-y)=2022(g(x)+g(y))-2021 x y .
$$
Answer: 2043231.

Solution. Substitute $x=y=0$, we get

$$
g(0)=2022(g(0)+g(0))-2021 \cdot 0 \Rightarrow g(0)=0
$$

Substitute $x=y$, we get

$$
\begin{gathered}
g(0)=2022(g(x)+g(x))-2021 \cdot x^{2} \Rightarrow g(x)=\frac{2021 x^{2}}{2 \cdot 2022} \Rightarrow \\
g(2022)=\frac{2021 \cdot 2022^{2}}{2 \cdot 2022}=\frac{2021 \cdot 2022}{2}=2021 \cdot 1011=2043231
\end{gathered}
$$