The isosceles triangle and rectangle have the same perimeter find the value of x

Answer:
x=15
Step-by-step explanation:
x+2+x+2+2x-2=9+8+9+8
2x+4=34
2x=30
x=15