Ta có: \(\left\{{}\begin{matrix}\left|x+1\right|\ge x+1\\\left|x+4\right|\ge x+4\end{matrix}\right.\)
\(\Rightarrow\left|x+1\right|+\left|x+4\right|\ge x+1+x+4\)
\(\Rightarrow\left|x+1\right|+\left|x+4\right|\ge2x+5\)
Do đó, \(\left|x+1\right|+\left|x+4\right|=2x+5\)
\(\Leftrightarrow\) \(2x+5=3x\) (vì theo bài ra thì \(\left|x+1\right|+\left|x+4\right|=3x\))
\(\Leftrightarrow\) \(5=3x-2x\)
\(\Leftrightarrow\) \(x=5\)
Vậy x = 5
Ta có: \(\left\{{}\begin{matrix}\left|x+1\right|\ge0\\\left|x+4\right|\ge0\end{matrix}\right.\)
\(\Rightarrow\left|x+1\right|+\left|x+4\right|\ge0\)
\(\Rightarrow3x\ge0\)
\(\Rightarrow x\ge0\)
\(\Rightarrow\left\{{}\begin{matrix}x+1>0\\x+4>0\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}\left|x+1\right|=x+1\\\left|x+4\right|=x+4\end{matrix}\right.\)
Do đó, \(x+1+x+4=3x\)
\(\Rightarrow2x+5=3x\)
\(\Rightarrow3x-2x=5\)
\(\Rightarrow x=5\)
Vậy \(x=5\) thì thỏa mãn đề bài