We can pose the question in the following way:

We have that the perimeter in a rectangle is:

We can substitute the first equation in the second equation:

Then, we have that P = 34. Thus:

We can substitute this value of w = 6 in the first equation, then:

Then, the length of the rectangle is l = 17 units.