The perimeter of the rectangle is 2(2x-5)+2(x+4)=4x-10+2x+8=6x-2.
The perimeter of the triangle is x+4+3x+8=4x+12.
Since they have equal perimeters we must have that 6x-2=4x+12. Therefore, 2x=14 which implies that x=7.
So the perimeter of the rectangle equals 40 and the perimeter of the triangle is also 40.