Solve this equation. 3^2x - 3^x+2 = 3^x - 9

To solve this equation, let's break it down step by step:

Step 1: Simplify the equation as much as possible.
- We can rewrite the equation using the properties of exponents:
3^(2x) - 3^(x+2) = 3^x - 9

Step 2: Combine like terms.
- Notice that all the terms involve 3 raised to some power. Since the bases are the same, we can write the equation as:
3^(2x) - 3^(x+2) - 3^x + 9 = 0

Step 3: Simplify further.
- Let's simplify the equation using the exponent rule that states that a^(b+c) = a^b * a^c:
3^(2x) - (3^x * 3^2) - 3^x + 9 = 0
3^(2x) - 9 * 3^x - 3^x + 9 = 0

Step 4: Combine like terms again.
- Now, we can rewrite the equation as follows:
3^(2x) - 9 * 3^x - 3^x + 9 = 0
3^(2x) - 10 * 3^x + 9 = 0

Step 5: Factor the equation, if possible.
- Unfortunately, the equation cannot be factored further.

Step 6: Solve for the variable.
- Now, we can solve for the variable x by using substitution.

Let's substitute a variable: y = 3^x.

After substituting, the equation becomes:

3^(2x) - 10 * 3^x + 9 = 0

Now, substitute y = 3^x back into the equation:

y^2 - 10y + 9 = 0

Step 7: Solve the quadratic equation.
- To solve the quadratic equation, we can factor it as follows:

(y - 1)(y - 9) = 0

Setting each factor to zero, we get:

y - 1 = 0 or y - 9 = 0

Solving for y gives: y = 1 or y = 9

Step 8: Substitute the values back into the original equation to find the corresponding values of x.
- Substitute y = 1 back into the equation:
3^x = 1
Solving for x: x = 0

- Substitute y = 9 back into the equation:
3^x = 9
Solving for x: x = 2

Step 9: Check the solutions.
- Substitute the values of x (0 and 2) back into the original equation to check if they are valid solutions.