(X-2)^2+X^2=(X+2)^2
2X^2-4x+4=x^2+4x+4
x^2-8x=0
Because x is the side length of a triangle and cannot be 0, therefore, X=8,
Therefore, the lengths of the three sides are 6, 8, 10 respectively.