Because it is possible that A is to the left of -2, but it is also possible that A is to the right of 2.
|a-(-2)| When A is to the left of -2, it is less than -2, so the subtraction is equal to -[a-(-2)]=3.
=-a-2
Then -a-2 is equal to 3.
Solve this equation: -a=5
a=-5
Edge.
|a-(-2)| When A is to the right of -2, it is greater than -2, so the big subtraction is equal to a-(-2).
Then a-(-2) is equal to 3.
Solve this equation: a= 1.