Under a sign of absolute value can stay positive or negative number.
If it is a positive number then the its absolute value is a number.
1) p-1=4
p=4+1
p=5
If it is a negative number then the its absolute value is a opposite of a number.
2) -(p-1)=4
-p+1=4
-p=4-1
-p=3
p=-3
So, this equation has 2 roots p=5, and p=-3.
Check:
|p-1|=4
|5-1|=4
|4|=4
4=4 True
|p-1|=4
|-3-1|=4
|-4|=4
4=4 True