For an irregularly shaped planar lamina of uniform density `(rho)` bounded by graphs `y=f(x),y=g(x)` and `a<=x<=b` , the mass `(m)` of this region is given by:

`m=rhoint_a^b[f(x)-g(x)]dx`

`m=rhoA` , where A is the area of the region.

The moments about the x- and y-axes are given by:

`M_x=rhoint_a^b 1/2([f(x)]^2-[g(x)]^2)dx`

`M_y=rhoint_a^bx(f(x)-g(x))dx`

The center of mass `(barx,bary)` is given by:

`barx=M_y/m`

`bary=M_x/m`

We are given, `y=-x^2+4x+2,y=x+2`

Refer to the attached image. The plot of `y=-x^2+4x+2` is in red color and the plot of `y=x+2` is in blue color. The curves intersect at `(0,2)` and `(3,5)` .

Now let's evaluate the area (A) of the region,

`A=int_0^3((-x^2+4x+2)-(x+2))dx`

`A=int_0^3(-x^2+4x+2-x-2)dx`

`A=int_0^3(-x^2+3x)dx`

Using basic integration properties:

`A=[-x^3/3+3x^2/2]_0^3`

`A=[-(3)^3/3+3/2(3)^2]`

`A=[-9+27/2]`

`A=9/2`

Now let's evaluate the moments about the x- and y-axes using the formulas stated above,

`M_x=rhoint_0^3 1/2([-x^2+4x+2)]^2-[x+2]^2)dx`

`M_x=1/2rhoint_0^3{[(-x^2+4x+2)+(x+2)][(-x^2+4x+2)-(x+2)]}dx`

`M_x=1/2rhoint_0^3{[-x^2+5x+4][-x^2+3x]}dx`

`M_x=1/2rhoint_0^3(x^4-3x^3-5x^3+15x^2-4x^2+12x)dx`

`M_x=1/2rhoint_0^3(x^4-8x^3+11x^2+12x)dx`

Evaluate using the basic integration rules:

`M_x=1/2rho[x^5/5-8(x^4/4)+11(x^3/3)+12(x^2/2)]_0^3`

`M_x=1/2rho[x^5/5-2x^4+11/3x^3+6x^2]_0^3`

`M_x=1/2rho[(3)^5/5-2(3)^4+11/3(3)^3+6(3)^2]`

`M_x=1/2rho[243/5-162+99+54]`

`M_x=1/2rho[243/5-9]`

`M_x=1/2rho[(243-45)/5]`

`M_x=1/2rho(198/5)`

`M_x=99/5rho`

`M_y=rhoint_0^3x((-x^2+4x+2)-(x+2))dx`

`M_y=rhoint_0^3x(-x^2+4x+2-x-2)dx`

`M_y=rhoint_0^3x(-x^2+3x)dx`

`M_y=rhoint_0^3(-x^3+3x^2)dx`

`M_y=rho[-x^4/4+3(x^3/3)]_0^3`

`M_y=rho[-x^4/4+x^3]_0^3`

`M_y=rho[-1/4(3)^4+3^3]`

`M_y=rho[-1/4(81)+27]`

`M_y=rho[(-81+108)/4]`

`M_y=rho(27/4)`

`M_y=27/4rho`

Now evaluate the center of mass by plugging in the values of moments and area as below:

`barx=M_y/m=M_y/(rhoA)`

`barx=(27/4rho)/(rho9/2)`

`barx=(27/4)(2/9)`

`barx=3/2`

`bary=M_x/m=M_x/(rhoA)`

`bary=(99/5rho)/(rho9/2)`

`bary=(99/5)(2/9)`

`bary=22/5`

The center of mass `(barx,bary)` are `(3/2,22/5)`