To solve the equation \( \log_3(x^2 - 5x + 4) - \log_3(x - 4) = 2 \), we can use the properties of logarithms to combine the two logarithmic terms on the left-hand side.
Using the property \( \log_b(a) - \log_b(c) = \log_b\left(\frac{a}{c}\right) \), we can rewrite the equation as:
\[ \log_3\left(\frac{x^2 - 5x + 4}{x - 4}\right) = 2 \]
Next, we can convert this logarithmic equation to its exponential form. Recall that if \( \log_b(a) = c \), then \( a = b^c \). Thus, we have:
\[ \frac{x^2 - 5x + 4}{x - 4} = 3^2 \] \[ \frac{x^2 - 5x + 4}{x - 4} = 9 \]
Now, we can multiply both sides by \( x - 4 \) (assuming \( x - 4 \neq 0 \)), giving us:
\[ x^2 - 5x + 4 = 9(x - 4) \]
Expanding the right-hand side:
\[ x^2 - 5x + 4 = 9x - 36 \]
Now, we can move all terms to one side to form a quadratic equation:
\[ x^2 - 5x + 4 - 9x + 36 = 0 \] \[ x^2 - 14x + 40 = 0 \]
Next, we can factor this quadratic:
\[ (x - 10)(x - 4) = 0 \]
Setting each factor equal to zero gives us the potential solutions:
\[ x - 10 = 0 \quad \Rightarrow \quad x = 10 \] \[ x - 4 = 0 \quad \Rightarrow \quad x = 4 \]
We must check for extraneous solutions since the logarithm is defined only for positive arguments.
Check \( x = 10 \):
- \( x^2 - 5x + 4 = 10^2 - 5(10) + 4 = 100 - 50 + 4 = 54 \) (positive)
- \( x - 4 = 10 - 4 = 6 \) (positive)
Check \( x = 4 \):
- \( x - 4 = 4 - 4 = 0 \) (not allowed since log can't take zero)
Thus, the only valid solution is:
\[ \boxed{10} \]