As we know perimeter of triangle is equal to sum of all three sides.
Let the third side = a.
So we can write perimeter as = 5x + 2x + 9 + a
As given perimeter = 10x + 2
So we can write 10x + 2 = 7x + 9 + a
10x + 2 - 7x - 9 = a
3x - 7 = a
So third side = 3x - 7.