By definition, we have
![|p+2| = \begin{cases} p+2 &\text{ if } p+2 \geq 0 \\-p-2 &\text{ if } p+2 < 0 \end{cases}](https://img.qammunity.org/2019/formulas/mathematics/college/5canzndk2ww1s8x75p1mgaaahwo87k104r.png)
So, we have to solve two different equations, depending of the possible range for the variable. We have to remember about these ranges when we decide to accept or discard the solutions:
Suppose that
![p+2\geq 0 \iff p \geq -2](https://img.qammunity.org/2019/formulas/mathematics/college/80117owydl0kscfcohnuoqsp4yyb2pj9fe.png)
In this case, the absolute value doesn't do anything: the equation is
![p+2 = 10 \iff p = 10-2 = 8](https://img.qammunity.org/2019/formulas/mathematics/college/blgmsuymvdln7a21b59g76u7ov903l0vuf.png)
We are supposing
, so we can accept this solution.
Now, suppose that
. Now the sign of the expression is flipped by the absolute value, and the equation becomes
![-p-2 = 10 \iff -p = 12 \iff p = -12](https://img.qammunity.org/2019/formulas/mathematics/college/bvh9gi1mm9mgusms4jb8b1mzgh7l4474rz.png)
Again, the solution is coherent with the assumption, so we can accept this value as well.