2. Let $\frac{-x^2+x-7}{(x+1)(x^2-3x+5)}=\frac{A}{x+1}+\frac{\color{red}Bx+C\color{b lack}}{x^2-3x+5}$.
3. The most general way is to multiply out the denominators (multiply both sides by $(x+1)(x^2-3x+5)$ then equate coefficients.