So you can think about this as three separate problems
When we get that and so this gives one equation.
Now we have to check to make sure the solution works.
Next try the region Here
This gives an identity So every value in this region works. (check it)
Finally we have the last region.
This gives the equation
I hope this clears things up a bit.
P.S don't forget to check your solutions as you may get solutions that fall outside the original domain of the question.