The foundation for a new building at the high school is rectangular in shape. The area of the foundation is 5x^3 + 4x^2 - 10x - 8 square meters. If the width equals (x^2 - 2) meters. What is the length of the rectangular foundation?