How do you find the value of x when the perimeter of the rectangle is 52?

Example on homework. ( length= 5x-1 width=2x+1 Perimeter=52 Find the value of x.