Lời giải:
a) Ta có: \(|x-5|=\left\{\begin{matrix} \text{x-5 nếu x}\geq 5\\ \text{5-x nếu x}< 5\end{matrix}\right.\)
Nếu \(x\geq 5:P=12x+7-|x-5|=12x+7-(x-5)=11x+12\)
Nếu \(x< 5: P=12x+7-|x-5|=12x+7-(5-x)=13x+2\)
b)
Nếu \(x\geq 5\)
\(P=11\Leftrightarrow 11x+12=11\Leftrightarrow 11x=-1\Leftrightarrow x=\frac{-1}{11}\) (vô lý vì \(x\geq 5\) )
Nếu \(x<5\)
\(P=11\Leftrightarrow 13x+2=11\Leftrightarrow 13x=9\Leftrightarrow x=\frac{9}{13}\) (thỏa mãn)
Vậy \(x=\frac{9}{13}\)