Find all real numbers $a$ such that in the solution set of the inequality $|x-a|+|1-3 x| \geqslant a+1$ with respect to $x$, there are exactly two distinct solutions whose distances to the point 1 are both $|a|$ (on the real number line).

Translate the text above into English, please keep the original text's line breaks and format, and output the translation result directly.
Solution: The two numbers whose distance to 1 is $|a|$ are $1+|a|$ and $1-|a|$.
(1) The necessary and sufficient condition for the solution of the original inequality to contain the number $x=1+|a|$ is
$$
|1+| a|-a|+|1-3(1+|a|)| \geqslant a+1,
$$

which is equivalent to $||a|-a+1|+|3| a|+2| \geqslant a+1$.
Clearly, $|a|-a+1>0,3|a|+2>0$. Thus,
Equation (1)
$$
\begin{array}{l}
\Leftrightarrow(|a|-a+1)+(3|a|+2) \geqslant a+1 \\
\Leftrightarrow 4|a|+2 \geqslant 2 a .
\end{array}
$$

The above inequality obviously holds, so the solution of the original inequality must include the number $x=1+|a|$.
(2) The necessary and sufficient condition for the solution of the original inequality to contain the number $x=1-|a|$ is
$$
\begin{array}{l}
|1-| a|-a|+|1-3(1-|a|)| \\
\geqslant a+1 .
\end{array}
$$

If $a \geqslant 0$, then Equation (2) becomes
$$
|2 a-1|+|3 a-2| \geqslant a+1 \text {. }
$$

We will discuss this in three cases.
(i) If $a \leqslant \frac{1}{2}$, then Equation (3) becomes
$$
1-2 a+2-3 a \geqslant a+1 \Rightarrow a \leqslant \frac{1}{3} \text {. }
$$

Thus, $0 \leqslant a \leqslant \frac{1}{3}$.
(ii) If $\frac{1}{2}<a<\frac{2}{3}$, then Equation (3) becomes
$$
2 a-1+2-3 a \geqslant a+1 \Rightarrow a \leqslant 0 \text {. }
$$

This is a contradiction. This case is impossible.
(iii) If $a \geqslant \frac{2}{3}$, then Equation (3) becomes
$$
2 a-1+3 a-2 \geqslant a+1 \Rightarrow a \geqslant 1 \text {. }
$$

Thus, $a \geqslant 1$.
If $a<0$, then Equation (2) becomes $|2+3 a| \geqslant a$. This inequality obviously holds.

Therefore, the necessary and sufficient condition for the solution of the original inequality to contain the number $x=1-|a|$ is $a \leqslant-\frac{1}{3}$ or $a \geqslant 1$.
Since $1+|a| \neq 1-|a|$, we have $|a| \neq 0$, i.e., $a \neq 0$.
In summary, the required $a$ is $a<0$ or $0<a \leqslant \frac{1}{3}$ or $a \geqslant 1$.