You can put this solution on YOUR website! first integrate and evaluate y = 1 + x + {x}^2
x+C +x^2/2 +x^3/3
Area under curve evaluated for x =0 to 2 is
2+2+8/3 = 6 2/3
the centroid of the area is total moments / area
total moments = integral from x = 0 to 2 of x*f(x)dx
x*f(x) = x + x^2 + x^3
now integrate x + x^2 + x^3
x^2/2 + x^3/3 + x^4/4
evaluate for x = 0 to 2
2 + 8/3 + 4 = 8 2/3
now calculate (8 2/3) / (6 2/3) = (26/3) / (20/3) = (26 * 3) / (20 * 3) = 1.3
centroid of the area is 1.3