The region trapped between two curves has area ∫ (top − bottom) dx. Slide the limits, add thin strips of height |f−g|, and watch them total the enclosed area.