I just did the question now (not in the test, unfortunately)
Well, you can swap the sum and integral because you can split integrals if the things inside are just added, like we do in partial fractions and everything. Then you take the constant out of the integral, because it's a constant