Let $r(x)=\max (f(x), g(x))$
$\therefore r(x)=2 x \,\,\, x \in(0,1)$
and $r(x)=x^{2} \,\,\, x \in(1,2)$
$\therefore I ( x )=\int\limits_{0}^{1} 2 xdx +\int\limits_{1}^{2} x ^{2} dx$
$\therefore I ( x )=\left[ x ^{2}\right]_{0}^{1}+\frac{\left[ x ^{3}\right]_{1}^{2}}{3}$
$=(1-0)+\frac{8-1}{3}=\frac{7}{3}$