Consider the linear Diophantine equation $x_1 + x_2 + x_3 = p $ where $p \in [- N, N] $ is fixed and $N \in \mathbb{N}$. Suppose that $|x_i| \leq N$ ($i = 1, 2, 3$) . Let $$ A = \{ (x_1, x_2, x_3) \in \mathbb{Z}^3 \mid |x_i| \leq N \quad \mbox{and} \quad x_1+ x_2 + x_3 = p \}. $$ Then, it is true that $|A| \leq C N^2$, for some $ C > 0$ ?
If $0 \leq x_i \leq N$ then one has $|A| \leq C N^2 $ but if one of the variables $x_i$ is negative the result seem not trivial. I am grateful for any suggestions.
Remark. $|A|$ denotes the number of elements of $A$.
First, fix some particular $-N \le x_1 \le N$ to get
$$x_2 + x_3 = p - x_1 \tag{1}\label{eq1A}$$
For each $-N \le x_2 \le N$, there are either $0$ or $1$ values of $-N \le x_3 \le N$ which satisfy \eqref{eq1A}. Thus, there are the most $2N + 1$ such solutions. This means each of the $2N + 1$ possible values of $x_1$ has at the most $2N + 1$ solutions, which results in
$$|A| \le (2N + 1)^2 = 4N^2 + 4N + 1 \le 9N^2 \tag{2}\label{eq2A}$$
This shows that $C = 9$ works in $|A| \le CN^2$.
Note you can also add $N$ to each variable, and $3N$ to $p$, to avoid negative values. In particular, you can use $x_i^{'} = x_i + N$, so $0 \le x_i^{'} \le 2N$, for $1 \le i \le 3$, to get the equivalent equation
$$x_1^{'} + x_2^{'} + x_3^{'} = p + 3N \tag{3}\label{eq3A}$$
where now all of the $x_i^{'}$ variables are non-negative.