Task B-1.2. Determine all integers $a$ for which the equation

$$
3 \cdot|x-2|+a \cdot|3-x|=a+4-x
$$

has integer solutions.
## Solution.

- 1. case

If $x \leq 2$, the equation becomes

$$
\begin{aligned}
& 3 \cdot(-x+2)+a \cdot(3-x)=a+4-x \\
& -3 x+6+3 a-a x=a+4-x \\
& -2 x-a x=-2 a-2 \\
& x=\frac{2 a+2}{a+2}=2-\frac{2}{a+2}
\end{aligned}
$$

The solution will be an integer if $a+2 \in\{1,-1,2,-2\}$, i.e., $a \in\{-1,-3,0,-4\}$. The inequality $x \leq 2$ holds only for $a \in\{-1,0\}$.

- 2. case

The case $2<x<3$ does not need to be considered since $x$ is an integer.

- 3. case

For $x \geq 3$, we solve the equation

$$
\begin{aligned}
& 3 \cdot(x-2)+a \cdot(x-3)=a+4-x \\
& x=\frac{4 a+10}{a+4}=4-\frac{6}{a+4}
\end{aligned}
$$

The solution will be an integer if $a+4 \in\{1,-1,2,-2,3,-3,6,-6\}$, i.e., $a \in\{-3,-5,-2,-6,-1,-7,2,-10\}$. The inequality $x \geq 3$ holds for $a \in\{-5,-6,-7,2,-10\}$.

- The final solution is: $a \in\{-10,-7,-6,-5,-1,0,2\}$.