An isosceles triangle has legs that measure each (2x³ - 4x² - 1). If the perimeter of the triangle is (9x³ + 2x² - 7x - 5), find the length of the missing side.