You can write, say, g(a, b) = \int_a^\infty f_1(bx)f_2(x) \,dx; then using the chain rule you get \frac{d}{da} g(a, a) = g_1(a, a) + g_2(a, a), where g1 is the partial derivative of g with respect to the first argument, and similarly for g2. For calculating g1, use the fundamental theorem of calculus; for calculating g2, move the derivative under the integral sign.