If x< 0, both x and x-6 are negative so |x|- |x-6|= -x-(-(x-6)= -x+ x- 6= -6.
If [itex]0\le x< 6[/itex], x- 6 is negative so |x|- |x-6|= x- (-(x-6))= x+x- 6= 2x- 6
If [itex]6\le x[/itex], both x and x- 6 are positive so |x|- |x-6|= x- (x-6)= 6.
We can write
[tex]|x|-|x-6|= \left\{\begin{array}{cc}-6 & if x< 0\\2x-6 & if 0\le x< 6\\6 & if x>6\end{array}\right[/tex]
We could also use the Heaviside step function. H(x), which is 0 for x< 0 and 1 for [itex]x\ge 0[/itex]. We want to start with -6 for x<0 and for x> 0 we have to add 2x: -6+ 2xH(x).
Now, if x is greater than 6, we need to change that -6 to 6 and eleminate the 2x. We can do that by adding 12- 2x.
|x|- |x-6|= -6+ 2xH(x)+ (12- 2x)H(x- 6).