To solve the equation \((x-2)(x^2+8x+16) = 7(4+x)\), we can start by expanding both sides.
First, let's expand the left side:
\[ (x-2)(x^2+8x+16) \]
This can be done by distributing \(x-2\) across \(x^2 + 8x + 16\):
\[ = x(x^2 + 8x + 16) - 2(x^2 + 8x + 16) \] \[ = (x^3 + 8x^2 + 16x) - (2x^2 + 16x + 32) \] \[ = x^3 + 8x^2 + 16x - 2x^2 - 16x - 32 \] \[ = x^3 + (8x^2 - 2x^2) + (16x - 16x) - 32 \] \[ = x^3 + 6x^2 - 32 \]
Now, let's expand the right side:
\[ 7(4+x) = 28 + 7x \]
Now we can set the expanded forms equal to each other:
\[ x^3 + 6x^2 - 32 = 28 + 7x \]
Next, we'll move all terms to one side of the equation:
\[ x^3 + 6x^2 - 7x - 32 - 28 = 0 \] \[ x^3 + 6x^2 - 7x - 60 = 0 \]
Now we have the polynomial equation \(x^3 + 6x^2 - 7x - 60 = 0\).
To solve this cubic equation, we can try to find rational roots using the Rational Root Theorem. Possible rational roots are the factors of \(-60\). We can test \(x = 2\):
\[ 2^3 + 6(2^2) - 7(2) - 60 = 8 + 24 - 14 - 60 = -42 \quad \text{(not a root)} \]
Let's try \(x = 3\):
\[ 3^3 + 6(3^2) - 7(3) - 60 = 27 + 54 - 21 - 60 = 0 \quad \text{(is a root)} \]
Since \(x = 3\) is a root, we can factor \(x - 3\) from the cubic polynomial. We can perform synthetic division of \(x^3 + 6x^2 - 7x - 60\) by \(x - 3\):
Using synthetic division:
3 | 1 6 -7 -60
| 3 27 60
-------------------
1 9 20 0
The quotient is \(x^2 + 9x + 20\). Now factor \(x^2 + 9x + 20\):
\[ x^2 + 9x + 20 = 0 \] \[ (x + 4)(x + 5) = 0 \]
Therefore, \(x + 4 = 0\) or \(x + 5 = 0\). This gives us the roots:
\[ x = -4 \quad \text{and} \quad x = -5 \]
Thus, the complete set of solutions is:
\[ x = 3, \quad x = -4, \quad x = -5 \]
So the final solutions to the equation \((x-2)(x^2 + 8x + 16) = 7(4+x)\) are:
\[ \boxed{3, -4, -5} \]