Answer:
x=4, perimeter is 30.
Explanation:
Let's calcualte the perimeter of the two figures. I'm assuming the pentagon is regular else the problem lacks information.
At this point the easiest to compute is the pentagon, one side is 6, the whole perimeter is 30.