The absolute value is a compact notation to write two possibilities: #|x|# equals #x# if #x# is positive, #-x# if #x# is negative.
This means that, to solve the absolute values in this equation, we have to consider all possible cases, depending on the sign of #x+2# and #x-2#. Let's consider them all:
Case 1: #x<-2#
In this case, both #x+2# and #x-2# are negative. This means that the absolute value flips the sign of both expressions: #|x+2|=-x-2# and #|x-2|=-x+2#. The equation becomes
#-x-2-x+2=4 \iff -2x=4 \iff x=-2#
But we are supposing #x<-2#, so we reject this solution (for now)
Case 2: #-2 \le x<2#
In this case, #x+2# is positive and #x-2# is still negative. This means that the absolute value flips only the sign of the second expression: #|x+2|=x+2# and #|x-2|=-x+2#. The equation becomes
#x+2-x+2 = 4 \iff 4=4#
This means that every numer between #-2# (included) and #2# (excluded, for now) is a solution for this equation.
Case 3: #x>=2#
In this case, both #x+2# and #x-2# are positive. This means that the absolute value has no effect anymore: #|x+2|=x+2# and #|x-2|=x-2#. The equation becomes
#x+2+x-2=4 \iff 2x=4 \iff x=2#
This means that #2# is actually a solution as well.
Here you can see that this function equals #4# on the whole #[-2,2]# interval.