### Instruction: $A$ and $B$ are constants such that
$$\frac{4x+5}{x^2+x-2}= \frac{A}{x+2} +\frac{B}{x-1}. $$Find $$\frac{B}{x+1} - \frac{A}{x-2}.$$.### Response: This is a problem involving partial fraction decomposition, where we want to write a rational expression as a sum of simpler fractions with linear denominators.
To do this, we need to find the values of $A$ and $B$ that make the equality hold for all values of $x$ that are not equal to $-2$ or $1$.
One way to do this is to multiply both sides of the equation by the common denominator $x^2+x-2$, which is the product of $x+2$ and $x-1$.
This will get rid of the fractions and give us a polynomial equation.
Let's do that and simplify:

\begin{align*}
\frac{4x+5}{x^2+x-2}&= \frac{A}{x+2} +\frac{B}{x-1} \\
(x^2+x-2) \left( \frac{4x+5}{x^2+x-2} \right) &= (x^2+x-2) \left( \frac{A}{x+2} +\frac{B}{x-1} \right) \\
4x+5 &= A(x-1) + B(x+2) \\
4x+5 &= Ax - A + Bx + 2B \\
\end{align*}
Now, we have a polynomial equation of degree 1 in $x$, so the coefficients of $x$ and the constant terms on both sides must be equal.
This gives us a system of two equations in two unknowns, $A$ and $B$:

\begin{align*}
4 &= A + B \\
5 &= -A + 2B \\
\end{align*}
We can solve this system by adding the two equations to eliminate $A$, or by using substitution, or by using a matrix method.
I will use substitution, since it seems simpler to me.
From the first equation, I can solve for $A$ in terms of $B$:

$$A = 4 - B$$
Then, I can plug this into the second equation and solve for $B$:

\begin{align*}
5 &= - (4 - B) + 2B \\
5 &= -4 + 3B \\
9 &= 3B \\
B &= 3 \\
\end{align*}
Once I have $B$, I can plug it back into the first equation and solve for $A$:

$$A = 4 - B = 4 - 3 = 1$$
So, I have found $A = 1$ and $B = 3$, which means the original equality can be written as:

$$\frac{4x+5}{x^2+x-2}= \frac{1}{x+2} +\frac{3}{x-1}$$