Solution:
Complete the square:
x2+4x−5=(x+2)2−32
Put x+2=t, so that dx=dt.
∫x2+4x−5dx=∫t2−32dt
We know that
∫x2−a2dx=2xx2−a2−2a2logx+x2−a2+C
Here a=3, so
∫t2−9dt=2tt2−9−29logt+t2−9+C
Substituting back t=x+2,
∫x2+4x−5dx=2x+2x2+4x−5−29logx+2+x2+4x−5+C