group them together (combine the factors you pulled out, which are x^2 and -6 then group them. x+7 is repeated twice so that can be combined into one factor.
Answer: Yes it is possible to design more than one flag with these lengths because the two smaller side lengths 27 and 40 is greater than 50 which is the larger side length.