He used a Partial Fractions decomposition.

Recall from when you were doing fractions that

.

He has had to go from the right hand side to the left hand side.

We write

.

Clearly the numerators are equal...

.

Equating like powers of x gives

and

.

.

Therefore, finally

.

Now it is easy to integrate.