Have you learned Peano Kernel? Otherwise, you can look at the Taylor Series for f(a) and f(b) and then the taylor series for each one of those functions in the summation. This is tedious, but I can't think of another way.

EDIT: Ah! Never mind. Consider the integral . This can be rewritten as

.

Now apply the trapezoidal rule (with error) to each integral...