Please check my method and also if I have solved the following problem correctly:
Problem: $f(x) = |x - \frac12| + |x + \frac12|$
If $x = -1$, then:
$f(-1) = |-1 - \frac12| + |-1 + \frac12|$
From the definition of $|x|$ we see that, $$|a-b| = \begin{cases} a - b & \text{if }a\geq b \\ b - a & \text{if }b \geq a\end{cases}$$ It is the order property for reals numbers that if $a$ is to the left of $b$ on the number line, then $a<b$ and vice versa.
Here, $-1$ is to the left of $-\frac12$, and also $-1$ is to the left of $\frac12$. Therefore, $-1<-\frac12$, and also $-1<\frac12$. So,
$f(-1) = \frac12 -(-1) + \frac12 -(-1)$
$f(-1) = \frac12 +1 + \frac12 +1$
$f(-1) = \frac12 +\frac12 + \frac21 $
$f(-1) = \frac{1+1+2} {2}$
$f(-1) = \frac{4} {2}$
$f(-1) = 2$