A rectangle has a length that is 4 more than twice its width. If the perimeter is 18 units, find the length and width of the rectangle.