Integrating partial fractions I have
$\int{\frac{2x+1}{x^2+4x+4}}dx$
Factorising the denominator I have
$\int{\frac{2x+1}{(x+2)(x+2)}}dx$
From there I split the top term into two parts to make it easier to integrate
$\int{\frac{2x+1}{(x+2)(x+2)}}dx$ = $\int{\frac{A}{(x+2)}+\frac{B}{(x+2)}}dx$
=$\int{\frac{A(x+2)}{(x+2)^2}+\frac{B(x+2)}{(x+2)^2}}dx$
Therefore
$2x+1 = A(x+2) +B(x+2)$
This is where I would normally use a substitution method to eliminate either the A term or B term by letting x = something like -2, which would get rid of the A and usually leave me with the B term to solve. However since they are the same I'm not sure what to do. 
I've been told to try evaluate the co-efficients, but am not sure how. 

In this case we a linear repeated factor so we split it like
$$\frac{A}{(x+2)}+\frac{B}{(x+2)^2}=\frac{A(x+2)+B}{(x+2)^2}$$
and hence 
$$2x+1=A(x+2)+B=Ax+2A+B$$
then by equating coefficients 
$$A=2,\\2A+B=1\implies B=-3$$
