My logic may be horrible.

Differentiate g(x)= definite integral on [2, x^2+3x-1] sec(t)dt and then prove the theorem you applied.

= antiderivative of sec(x^2+3x-1) - antiderivative of sec(2)

d/dx(ntiderivative of sec(x^2+3x-1) - antiderivative of sec(2))

= sec(x^2+3x-1) - sec(2)

Which is exactly what the integral originally states, isn't it?