First, use linearity if the integral to write
∫ 0 3 ( f ( x ) g ( x ) ) d x = ∫ 0 3 f ( x ) d x + ∫ 0 3 g ( x ) d x . {\displaystyle {\begin{aligned}\int _{0}^{3}(f(x)g(x))dx=\int _{0}^{3}f(x)dx+\int _{0}^{3}g(x)dx.\end{aligned}}}
Next, we write ∫ 0 3 f ( x ) d x = ∫ 0 5 f ( x ) d x − ∫ 3 5 f ( x ) d x {\displaystyle \int _{0}^{3}f(x)dx=\int _{0}^{5}f(x)dx-\int _{3}^{5}f(x)dx} and use the given values of the integrals to compute
∫ 0 3 ( f ( x ) g ( x ) ) d x = ∫ 0 5 f ( x ) d x − ∫ 3 5 f ( x ) d x + ∫ 0 3 g ( x ) d x = 3 − 2 + 7 = 8. {\displaystyle {\begin{aligned}\int _{0}^{3}(f(x)g(x))dx=\int _{0}^{5}f(x)dx-\int _{3}^{5}f(x)dx+\int _{0}^{3}g(x)dx=3-2+7=8.\end{aligned}}}