This is a simple problem. What I want to know is whether there is an easy and fast way to solve the problem. I solved this problem by considering four situations: a) $x>1$, b) $0<x<1$, c) $x<0$, and d) $x<-1$. Is there any way to eliminate some situations without going through detailed calculations?
Find the two values of $x$ for which $|x-1| + |x| + |x+1| =5/2$.
Yes. First note this is an even function, hence you only have to find roots on $[0,+\infty)$.
Second, it is affine by intervals, and as such, on each of these intervals it is monotonic.
Third, $f(1)=3$ , and as $f(x)\to +\infty$ as $x\to+\infty$, it is increasing on $[1,+\infty)$, there can be no root in this interval.
Thus a positive root can be obtained only in $[0,1]$. On this interval, $f(x)=2+x$, and the root is $\dfrac12$. Add the negative root: $-\dfrac12$, and you're done.