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

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

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

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

Substitute $x=y$, we get

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