Flow rate of leaking chemicals 
Chemicals from a storage tank are leaking into a pond. The rate of flow is measured at intervals and is recorded in the table below where $t$ is measured in hours and $R(t)$ in gallons per hour:
  $$
\begin{array}{l|ccccccccc}
\hline
T & 0 & 2 & 4 & 6 & 8 & 10 & 12 & 14 & 16 \\
\hline
R(T) & 40 & 38 & 36 & 30 & 26 & 18 & 8 & 6 & 3 \\
\hline
\end{array}
$$
   a) What is the average rate of flow during the first 8 seconds?
   b) Estimate the instantaneous flow at 4 seconds.

I just don't understand this problem, the answer key is wrong and doesn't even give an answer to part $b$. I don't just need the answer; I'm studying, so I would really appreciate an explanation.
 A: Ok, well I'll assume the question means hours and not seconds.
I'll do it the calculus way first, then show you the no-brainer way.

Using Calculus concepts
What we're going to do is approximate the flow quantity curve from the flow rate curve as given. To do so, we're going to use a Riemann sum based on the tabular data. Imagine integrating the curve by adding up the areas of several rectangles. Each rectangle is 2 hours wide, and the height of the rectangle is the value of $R(T)$. Let's call the total flow $F(T)$
That gives us the following:
$$\begin{array}{ccl}
T = 0 & \implies & F(0) = 0 \\
T = 2 & \implies & F(2) = 2\cdot R(T=0) = 80 \\
T = 4 & \implies & F(4) = 2\cdot R(T=2) = 80+76 = 156\\
T = 6 & \implies & F(6) = 2\cdot R(T=4) = 80+76+72 = 228 \\
T = 8 & \implies & F(8) = 2\cdot R(T=6) = 80+76+72+60 = 288
\end{array}$$
So what this table does is it approximates the area under the curve $R(t)$. In other words, at time $T=0$, we measure a flow rate of 40 gallons per hour. We don't measure it again for another two hours, so we assume it to be constant. When we come back at $T=2$, we expect that 80 gallons have flowed out of the tank. We measure the flow rate at $T=2$ and find it to be $38$ gallons per hour. Add these 80 gallons to our next measurement, taken at $T=4$, assuming the flow rate to be constant, and so on.
Now, we have our flow curve. We use the mean value theorem to establish the average flow rate. This is simple:
$$\overline{R(T)} = \overline{F'(T)} = \frac{F(T=8)-F(T=0)}{8-0} = \frac{288}{8} = 36.$$
Note that the overline notation is often used to denote "average".

The No-Brainer Way
The problem gives you the flow rate and asks you for the average flow rate. Essentially, just take the average of the values!
$$\overline{R(T)} = \frac{40+38+36+30}{4} = \frac{144}{4} = 36.$$

A better approximation
Now, you might think, "wait a second, why are we assuming that the flow rate stays constant from time 0 to time 2? Clearly it must be decreasing.
That's probably true! So what if we used a better approximation to the area under the flow rate curve. Instead of rectangles that over-estimate the area, let's use rectangles that under-estimate the area, and on top of each rectangle, add a triangle whose hypotenuse connects the values at $R(T=T_1)$ and $R(T=T_2)$.
The general formula isn't complicated!
$$\begin{align*}
F(0) &= 0 \\
F(T_n) &= F(T_{n-1}) + \Delta T \cdot R(T_n) + \frac12 \Delta T \cdot (R(T_{n-1})-R(T_n))\\
 &= F(T_{n-1}) + \frac12 \Delta T \left(R(T_{n-1})+R(T_n)\right)
\end{align*}
$$
This gives us the following results:
$$\begin{align*}
F(0) &= 0 \\
F(2) &= 40+38 = 78 \\
F(4) &= 78 + 38+36 = 152 \\
F(6) &= 152 + 36+30 = 218 \\
F(8) &= 218 + 30+26 = 274
\end{align*}
$$
Now, computing the average as before, we get
$$\overline{R(T)} = \frac{274}{8} = 34.25.$$
This is lower than before, because we're not over-estimating the flow rate.

Part (b)
For Part (b), notice that the table gives you instantaneous flow rates..
