The length of the sides of a square measures 2x-5. The length of a rectangle measures 2x and the width measures x+2. For what value of x is the perimeter of the square the same as the perimeter of the rectangle.

4(2x+5) = 2(2x) + 2(x+2)