Two equal sides of an isosceles triangle are (3x - 1) units and (2x + 2) units. The third side is 2x units. Find x and
the perimeter of the triangle.