\[x + 2 \cdot \left( x + 3 \cdot (x - 4) \right) - 5 =\]
\[= x + 2x + 6 \cdot (x - 4) - 5 =\]
\[= 3x + 6x - 24 - 5 = 9x - 29\]