Decomposition by parts I fully understand how everything is computed in this exercise, but I seem to miss one thing: why is B multiplied by (2x+2)?
I understand that due to the fact that there is an irreducible quadratic factor x^2+2x+5, it is necessary to have one factor B multiplied by x (according to my book James and Stewart, Calculus - Early Transcedentals) and add another factor C. 
However, in this exercise (I have seen others as well), they seem to multiply it by the first derivative of the denominator.. I don't know if my observation is correct or not.
I greatly appreciate any input, thank you very much in advance.

 A: The short version: the proof is using a superficially different version of the method of partial fractions, but we can see quickly that it's not meaningfully different from the version you learned (and so if you're comfortable with one, you should quickly become comfortable with the other, although obviously you may have a preferred version to use yourself). The advantage of the method here is that it makes the final integration a bit easier.

Note that $$B(2x+2)+C=(2B)x+(2B+C).$$ This means that we can switch between the two versions: we have $${A\over x-2}+{B(2x+2)\over x^2+2x+5}+{C\over x^2+2x+5}={A\over x-2}+{2B\over x^2+2x+5}+{2B+C\over x^2+2x+5}.$$ So letting $\hat{A}=A, \hat{B}=2B,\hat{C}=2B+C$ lets us convert from one form to another.
Put another way: any expression that can be put in the form $${A\over x-2}+{Bx\over x^2+2x+5}+{C\over x^2+2x+5}$$ for some constants $A,B,C$ can also be put in the form $${A\over x-2}+{B(2x+2)\over x^2+2x+5}+{C\over x^2+2x+5}$$ for some (different) constants $A,B,C$, and vice versa. So this version of the method of partial fractions works just as well as the one you learned: given an expression of the appropriate form, we can always decompose it in this way.
Indeed, we could use any linear polynomial in place of $2x+2$ here! So while you've seen partial fractions presented in one particular way, we actually have a choice here. Using the derivative of $x^2+2x+5$ makes it particularly easy to integrate, and so we do that. On the other hand, it's easier to memorize the method when we always use the same linear polynomial, and so some texts teach that instead. 
Personally I think presenting it that way obscures what's going on, but it's sort of a moot point anyways since most texts don't teach why partial fraction decompositions are always guaranteed to exist - which is reasonable, sadly, since the proof uses material from further on in mathematics (namely the fundamental theorem of algebra) - so it's going to be mysterious no matter how it's presented.
