The length of a rectangle is 7 inches less than three times the width. If the area of the rectangle is 40 square inches, determine the width of the rectangle.