$\begin{align}{\bf Hint}\quad \dfrac{3x\!+\!2}{x(x\!+\!1)} &= \dfrac{a(x\!+\!1)+bx}{x(x\!+\!1)}\\[.2em]
\Rightarrow\ \ \ \ \ 3x\!+\!2\,\ &=\ a(x\!+\!1)+bx\ \ {\rm for\ all\ }\, x\neq 0,-1\\[.2em]
\Rightarrow\ \ \ \ \ 3x\!+\!2\,\ &=\ a(x\!+\!1)+bx\ \ {\rm for\ all\ }\, x \ \ \ (\,\color{#c00}{0,-1 \ \rm included\:\!)}
\end{align}$

since their difference is a polynomial with *infinitely* many roots (all $\,x\neq 0,-1)$ so it must be the zero polynomial (recall that a nonzero polynomial over a field has no more roots than its degree)

**Generally** $ $ If $\,f,g\,$ and $\,h\!\ne\! 0\,$ are polynomial functions over $\,\mathbb R\,$ (or any $\rm\color{#0a0}{infinite}$ field) then

$$\begin{eqnarray} \smash[b]{\dfrac{f(x)}{h(x)} = \dfrac{g(x)}{h(x)}} \,&\Rightarrow&\ f(x) = g(x)\ \ {\rm for\ all}\,\ x\in\mathbb R\, \ {\rm such\ that}\,\ h(x)\ne 0\\[.2em]
&\Rightarrow&\ f(x) = g(x)\ \ {\rm for\ all}\ \,x\in \mathbb R
\end{eqnarray}\qquad$$

by $\,p(x) = f(x)\!-\!g(x) = 0\,$ has $\rm\color{#0a0}{infinitely}$ many roots [all $\,x\in \mathbb R\,$ except *finite* #roots of $\,h(x)$], $ $ hence $\,p\,$ is the zero polynomial $\, 0 = p = f -g,\,$ so $\, f = g.$

Thus to solve for coef's $\,a,b\,$ that occur in $\,g\,$ it is valid to evaluate $\,f(x) = g(x)\,$ at *any* $\,x\in \mathbb R,\,$ since it holds true for all $\,x\in \mathbb R\,$ (including all real roots of $\, h).$

**Remark** $ $ The method you describe is known as the Heaviside cover-up method. It can be generalized to higher-degree denominators as I explain here.

Partial fractions is for rational functions of a variable $x$, and what you have is not a rational function of $n$.
The methods that work for rational functions should not be expected to work here.

If you want to write
$$ \frac{5^n 3^n}{(5^n- 3^n)(5^{n+1}-3^{n+1})} = \frac{A}{5^n - 3^n} - \frac{B}{5^{n+1}-3^{n+1}}$$
(presumably when the none of the denominators are $0$),
that is equivalent to
$$ 5^n 3^n = (5^{n+1}-3^{n+1}) A - (5^n-3^n) B $$
Now there are certainly no solutions where $A$ and $B$ are constants. A solution where $A$ and $B$ are multiples of $3^n$ is $A= 3^n/2$, $B = 3^{n+1}/2$. A solution where
$A$ and $B$ are multiples of $5^n$ is $A = 5^n/2$, $B = 5^{n+1}/2$.
Or you could take a combination of these solutions:

$$ A = \frac{5^n}{2} t + \frac{3^n}{2} (1-t),\ B = \frac{5^{n+1}}{2} t + \frac{3^{n+1}}{2} (1-t) $$

where $t$ is arbitrary.

## Best Answer

$A(x+2)+B(x-1)$ is a polynomial in $x$, as is $x-7$. I wanted values of $A$ and $B$ that make these two polynomials equal for all real numbers except $1$ and $-2$. But polynomials are continuous and so two polynomials that agree at infinitely many real numbers are necessarily identically equal and will therefore agree at

allreal numbers. In particular, $A(x+2)+B(x-1)$ will hold at $x=1$ and $x=-2$ if it holds at all other integers, so we can substitute $x=1$ and $x=-2$ as shortcuts to finding the correct values of $A$ and $B$.