The "average" value of a function, f, on the interval $a\le x\le b$ is $\frac{\int_a^b f(x)dx}{b-a}$ so knowing that the average of f on [tex]a\le x\le 5[/itex] is 4 tells you that $\frac{\int_2^5 f(x)dx}{3}= 4$ so $\int_2^5 f(x)dx= 4(3)= 12$.
$\int_2^5 (3f(x)+ 2)dx= 3\int_2^5 f(x)dx+ 2\int_2^5 dx$.