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

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

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

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

Substitute $x=y$, we get

$$
\begin{gathered}
g(0)=g(x)+g(x)-2022(x+x) \Rightarrow g(x)=2022 x \Rightarrow \\
g(2021)=2022 \cdot 2021=4086462 .
\end{gathered}
$$