Consider the expression in $x$ $$P = | x - 1 | + | x - 2 | + | x - a | .$$ We are to find the range of real numbers $a$ such that the value of $P$ is minimized at $x = a$. First, let us note that the inequality $$| x - 1 | + | x - 2 | + | x - a | \geqq | x - 1 | + | x - 2 |$$ always holds, and is an equality in the case $x = a$. When we set $$y = | x - 1 | + | x - 2 | ,$$ we have $$y = \begin{cases} - \mathbf { A } & x + \mathbf { B } \\ \mathbf { D } & ( x < \mathbf { C } ) \\ \mathbf { F } & ( \mathbf { C } \leqq x \leqq \mathbf { E } ) \\ \mathbf { G } & ( \mathbf { E } < x ) . \end{cases}$$ When we consider the graph of (1), we see that the minimum value of $y$ is $\mathbf { H }$ and $y$ takes the value $\mathbf{H}$ at every $x$ satisfying $\mathbf{I} \leqq x \leqq \mathbf{J}$. Thus, for every $a$ satisfying $\mathbf{K} \leqq a \leqq \mathbf{L}$, the value of $P$ is minimized at $x = a$ and its value there is $\mathbf{M}$.
Consider the expression in $x$
$$P = | x - 1 | + | x - 2 | + | x - a | .$$
We are to find the range of real numbers $a$ such that the value of $P$ is minimized at $x = a$.
First, let us note that the inequality
$$| x - 1 | + | x - 2 | + | x - a | \geqq | x - 1 | + | x - 2 |$$
always holds, and is an equality in the case $x = a$.
When we set
$$y = | x - 1 | + | x - 2 | ,$$
we have
$$y = \begin{cases} - \mathbf { A } & x + \mathbf { B } \\ \mathbf { D } & ( x < \mathbf { C } ) \\ \mathbf { F } & ( \mathbf { C } \leqq x \leqq \mathbf { E } ) \\ \mathbf { G } & ( \mathbf { E } < x ) . \end{cases}$$
When we consider the graph of (1), we see that the minimum value of $y$ is $\mathbf { H }$ and $y$ takes the value $\mathbf{H}$ at every $x$ satisfying $\mathbf{I} \leqq x \leqq \mathbf{J}$.
Thus, for every $a$ satisfying $\mathbf{K} \leqq a \leqq \mathbf{L}$, the value of $P$ is minimized at $x = a$ and its value there is $\mathbf{M}$.