The given pentagon can be divided into two figures : a triangle and rectangle as shown in figure.
Let us find area of each figure separately.
Triangle:
Area of triangle is given by:
[tex]A=\frac{1}{2}*b*h[/tex]
where b=base and h=height
Height of triangle :
h=(3x+5)-(2x+1)
h=x+4
Base = 2x-2
[tex]A=\frac{1}{2}*(x+4)(2x-2)[/tex]
Area of triangle= (x-1)(x+4) = x²+3x-4
Area of rectangle:
Area of rectangle is given by:
A=l*b
[tex]A=(2x-2)(2x+1)[/tex]
Area of rectangle = 4x²-2x-2
Area of pentagon = Area of triangle + Area of rectangle
Area of pentagon = x²+3x-4 + 4x²-2x-2
Area of pentagon = 5x²+x-6
If area of pentagon is 42 cm², then solving for x,
[tex]42=5x^{2}+x-6[/tex]
[tex]5x^{2}+x-48=0[/tex]
Factorising to get x,
x=-3.2 and x=3
If we take x as negative the side will be negative, so we neglect x=-3.2
So x=3 is the answer.