[tex]\displaystyle\int_2^8g(x)\,\mathrm dx=12[/tex]
[tex]\displaystyle\int_6^8g(x)\,\mathrm dx=-3[/tex]
Use the fact that integrals are additive on their intervals. Mathematically, if [tex]c\in[a,b][/tex], then
[tex]\displaystyle\int_a^bg(x)\,\mathrm dx=\int_a^cg(x)\,\mathrm dx+\int_c^bg(x)\,\mathrm dx[/tex]
So we have
[tex]\displaystyle2\int_2^6g(x)\,\mathrm dx=2\left(\int_2^8g(x)\,\mathrm dx-\int_6^8g(x)\,\mathrm dx\right)=2(12-(-3))=30[/tex]