TH1: \(x\le1\) <=> \(\left\{{}\begin{matrix}\left|x-1\right|=1-x\\\left|x-4\right|=4-x\end{matrix}\right.\)
PT <=> \(3\left(1-x\right)+2\left(4-x\right)=x+17\)
<=> x = -1 (chọn)
TH2: \(1< x< 4< =>\left\{{}\begin{matrix}\left|x-1\right|=x-1\\\left|x-4\right|=4-x\end{matrix}\right.\)
PT <=> 3(x-1) + 2(4-x) = x+17
<=> x = \(\varnothing\)
TH3: \(x\ge4< =>\left\{{}\begin{matrix}\left|x-1\right|=x-1\\\left|x-4\right|=x-4\end{matrix}\right.\)
PT <=> 3(x-1) + 2(x-4) = x+17
<=> x = 7 (chọn)
KL: \(S=\left\{-1;7\right\}\)