I don’t understand how to get the answer

x = –5 or x = 3
Solution:
Given expression:
[tex]|-1-x|=4[/tex]
[tex]\Rightarrow |-x-1|=4[/tex]
⇒ –x – 1 = 4 or –x – 1 = 4
First take –x – 1 = 4.
Add 1 on both side of the equation.
⇒ –x – 1 + 1 = 4 + 1
⇒ –x = 5
Divide by –1 on both side of the equation, we get
⇒ x = –5
Now take –x – 1 = –4.
Add 1 on both side of the equation.
⇒ –x – 1 + 1 = –4 + 1
⇒ –x = –3
Divide by –1 on both side of the equation, we get
⇒ x = 3
x = –5 or x = 3
Hence the two values of x are –5 or 3.