f(x)=|x-2|={\begin{matrix}2-x; x<2 \\ x-2; x\geq 2\end{matrix}
g(x)=f(f(x))={\begin{matrix}2-f(x); f(x)<2 \\ f(x)-2; f(x)\geq 2\end{matrix}
={\begin{matrix}2-(2-x); 2-x<2, x<2 \\ (2-x)-2; 2-x\geq 2, x<2 \\ 2-(x-2); x-2<2, x\geq 2 \\ (x-2)-2; x-2\geq 2, x\geq 2\end{matrix}
={\begin{matrix}2-(2-x);0<x<2 \\ (2-x)-2;x<0 \\ 2-(x-2);2\leq x<4 \\ (x-2)-2;x\geq 4\end{matrix}
∫03(g(x)−f(x))dx=∫02xdx+∫23(4−x)dx−∫03∣x−2∣dx
=[2x2]02+[4x−2x2]23−[2x−2x2]02−[2x2−2x]23
=1.