The width of a rectangle is (x-5) and the length is (x+2). What is the length and width of the rectangle if the area is 18 square feet?