Your congruences have the general form
$$\sum_{i=1}^r x_i + c\equiv\sum_{j=1}^s y_j \quad(\textrm{mod } m).$$
This implies the following three relations among the $s_k$'s:
- $\sum_k k\, s_k \equiv c \ (\textrm{mod } m)$
- $\sum_k s_k = s - r$
- $\sum_k |s_k| \le r+s$, with equality iff no $x_i$ takes the same value as a $y_j$.
(The first is just the original congruence restated, and the second says that if you sum up the $s_k$'s you get the number of $y$'s minus the number of $x$'s. The third isn't needed for your example but seems useful in some larger cases; it follows since
$$|s_k|\le \#\{y_j\mid y_j=k\}+\#\{x_i\mid x_i=k\}.)$$
In addition, we know that, for each $k$, $-r\le s_k\le s$.
Specializing to your example: $r=3$, $s=2$, $m=3$, $c=0$, so equations (1) and (2) reduce to
- $ s_1-s_2 \equiv 0 \ (\textrm{mod } 3)$
- $s_0+s_1+s_2 = -1 $
where $-3\le s_k\le 2$.
Equation (1) says $s_1$ and $s_2$ are congruent mod 3, but since the $s_k$'s are constrained to an interval of length 5, $|s_1-s_2|$ is either 0 or 3. In the former case, $s_1$ and $s_2$ have the same parity, so we conclude $s_0$ is odd (taking equation (2) mod 2). In the latter case, $s_1$ and $s_2$ have opposite parity, so $s_0$ is even. Thus, in both cases, we have
$$\frac{|s_1-s_2|}{3}+ \frac{1-(-1)^{s_0}}{2}= 1$$
since one of the summands is 1, and the other is 0. The desired inequality follows.