Gradient = vertical difference elevation/horizontal distance. So to calculate the average gradient along the stream from the red dot at B to the red dot at A (or vise versa) two facts need to be known. the difference in elevation between B to A. the distance along the stream from B to A