To solve the equation \(\frac{x+3}{5} = \frac{32-x}{x+4}\), we can start by cross-multiplying to eliminate the fractions. This gives us:
\[ (x + 3)(x + 4) = 5(32 - x) \]
Now expand both sides:
Left side: \[ x^2 + 4x + 3x + 12 = x^2 + 7x + 12 \]
Right side: \[ 5(32 - x) = 160 - 5x \]
Now we have: \[ x^2 + 7x + 12 = 160 - 5x \]
Next, we can bring all terms to one side of the equation to set it to zero:
\[ x^2 + 7x + 12 + 5x - 160 = 0 \]
Combine like terms: \[ x^2 + 12x - 148 = 0 \]
Now, we can use the quadratic formula to solve for \(x\): \[ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \]
Here, \(a = 1\), \(b = 12\), and \(c = -148\). Substitute these values into the formula:
Calculate the discriminant: \[ b^2 - 4ac = 12^2 - 4(1)(-148) = 144 + 592 = 736 \]
Now, substitute back into the quadratic formula:
\[ x = \frac{-12 \pm \sqrt{736}}{2(1)} \]
Simplifying \(\sqrt{736}\): \[ \sqrt{736} = \sqrt{16 \times 46} = 4\sqrt{46} \]
Substitute back to find \(x\): \[ x = \frac{-12 \pm 4\sqrt{46}}{2} \] \[ x = -6 \pm 2\sqrt{46} \]
So the solutions are: \[ x = -6 + 2\sqrt{46} \quad \text{and} \quad x = -6 - 2\sqrt{46} \]
It's good to check if either solution leads to division by zero in the original equation. Substitute each back into the original denominators \(x + 4\) and check if they produce any invalid expressions. The solutions are valid unless \(x + 4 = 0\), which does not happen for either solution.
Thus the final answers are: \[ x = -6 + 2\sqrt{46} \quad \text{and} \quad x = -6 - 2\sqrt{46} \]