(a) The entire interval has length b−a, and we're cutting it into n pieces, so the length of one piece (and hence the distance between two consecutive samples) is nb−a.
(b) The first sample, as given in the question statement, is taken at x=a. The second sample, then, is at x=a+nb−a, this third is at x=1+2nb−a, and the fourth is at a+3nb−a.
(c) The y-value of the fourth sample is simply f(a+3nb−a). Note this is the number we use in our average, not the x-value.
(d) Our samples are f(a), f(a+nb−a),
f(a+2nb−a),
f(a+3nb−a), etc. Since there are n of them, we divide their sum by n. So, the average is:
Remark: if we multiply and divide by b−a, we see this expression is equivalent to a left Riemann sum, divided by the length of our interval. nf(a)+f(a+nb−a)+f(a+2nb−a)+⋯+f(a+(n−1)nb−a)=n1[f(a)+f(a+nb−a)f(a+2nb−a)+⋯+f(a+(n−1)nb−a)]=n1i=1∑nf(a+(i−1)nb−a)=b−a1i=1∑nf(a+(i−1)nb−a)nb−a=b−a1i=1∑nf(a+(i−1)Δx)Δx
As n gets larger and larger, using the definition of a definite integral, this expression gets closer and closer to b−a1∫abf(x)dx. This is one way of justifying our definition of an average of a function on an interval.