The numerator is
2x^2+4x+12=2(x^2+2x+6)
We perform a long division
color(white)(aaaa)x^2+2x+6color(white)(aaaaa)|x^2+7x+10
color(white)(aaaa)x^2+7x+10color(white)(aaaa)|1
color(white)(aaaaaa)0-5x-4
Therefore
(2x^2+4x+12)/(x^2+7x+10)=2(1-(5x+4)/(x^2+7x+10))
We factorise the denominator
x^2+7x+10=(x+5)(x+2)
We can perform the decomposition into partial fractions
(5x+4)/(x^2+7x+10)=(5x+4)/((x+5)(x+2))
=A/(x+5)+B/(x+2)=(A(x+2)+B(x+5))/((x+5)(x+2))
The denominators are the same, we compare the numerators
5x+4=A(x+2)+B(x+5)
Let x=-5, =>, -21=-3A, =>, A=7
Let x=-2, =>, -6=3B, =>, B=-2
So,
(2x^2+4x+12)/(x^2+7x+10)=2(1-(7/(x+5)-2/(x+2)))
Therefore,
int((2x^2+4x+12)dx)/(x^2+7x+10)=2int(1-(7/(x+5)-2/(x+2)))dx
=2intdx-14intdx/(x+5)+4intdx/(x+2)
=2x-14ln(|x+5|)+4ln(|x+2|)+C