The length of a rectangle is three times the width. An equation that models the perimeter of the rectangle is 3w+2w=40, where w is the width of the rectangle in feet. What are the length and width of the rectangle?