Solution:The line [tex]g[/tex] passes through [tex]B[/tex] and [tex]A[/tex]:
[tex]g(0)=n=\frac{16}{3},\qquad g(8)=8k+\frac{16}{3}=0\ \Rightarrow\ k=-\frac{2}{3},\qquad g(x)=-\frac{2}{3}x+\frac{16}{3}[/tex]
The function [tex]f[/tex]. If [tex]x\ge 1[/tex], then [tex]\left|1-x\right|=x-1[/tex] and [tex]3x+1-(x-1)=2x+2\gt 0[/tex], so
[tex]f(x)=2x+2-2x=2[/tex]
If [tex]x\lt 1[/tex], then [tex]\left|1-x\right|=1-x[/tex] and [tex]3x+1-(1-x)=4x[/tex], so [tex]f(x)=\left|4x\right|-2x[/tex]:
[tex]0\le x\lt 1:\ f(x)=4x-2x=2x,\qquad x\lt 0:\ f(x)=-4x-2x=-6x[/tex]
So the graph of [tex]f[/tex] is the ray [tex]y=-6x[/tex] for [tex]x\lt 0[/tex], the segment from [tex]O(0, 0)[/tex] to [tex]C(1, 2)[/tex] and the horizontal ray [tex]y=2[/tex] for [tex]x\ge 1[/tex]. Intersection points with [tex]g[/tex]:
[tex]-6x=-\frac{2}{3}x+\frac{16}{3}\ \Rightarrow\ x=-1\lt 0,\quad P(-1, 6)[/tex]
[tex]2=-\frac{2}{3}x+\frac{16}{3}\ \Rightarrow\ x=5\ge 1,\quad Q(5, 2)[/tex]
The equation [tex]2x=-\frac{2}{3}x+\frac{16}{3}[/tex] gives [tex]x=2[/tex], which is rejected, because the formula [tex]f(x)=2x[/tex] holds only for [tex]0\le x\lt 1[/tex].
The graphs meet only at [tex]P[/tex] and [tex]Q[/tex], and at [tex]x=0[/tex] we have [tex]g(0)=\frac{16}{3}\gt 0=f(0)[/tex], so for [tex]-1\lt x\lt 5[/tex] the line [tex]g[/tex] lies above the graph of [tex]f[/tex]; both functions are non-negative there. The enclosed figure has vertices [tex]P(-1, 6)[/tex], [tex]O(0, 0)[/tex], [tex]C(1, 2)[/tex], [tex]Q(5, 2)[/tex], and its area is the area under [tex]g[/tex] minus the area under [tex]f[/tex] on [tex]\left[-1, 5\right][/tex].
Under [tex]g[/tex]: a trapezoid with parallel sides [tex]g(-1)=6[/tex] and [tex]g(5)=2[/tex] and width [tex]6[/tex]. Under [tex]f[/tex]: two triangles and a rectangle:
[tex]S_g=\frac{6+2}{2}\times 6=24,\qquad S_f=\frac{1}{2}\times 1\times 6+\frac{1}{2}\times 1\times 2+4\times 2=3+1+8=12[/tex]
[tex]S=S_g-S_f=24-12=12[/tex]
