Hello. To answer your question about why use y = |x|
The answer is that it was absolutely not necessary to do so and it just made it confusing for you. The answer is correct as stated though: |x| <= 1 or |x| > 2
In other words, you could have solved this problem without making that substitution and just used |x| directly instead of using y.