By Pythagoras' theorem, (x+2)^2 + x^2 = 10^2 (sum of the squares containing the right angle is equal to the square on the hypotenuse)
I.e. x^2+4x+4 + x^2 = 100
i.e. 2x^2 + 4x + 4 = 100
i.e. 2x^2 + 4x = 100-4 = 96
i.e. x^2 + 2x = 48
i.e. x(x+2) = 48
By inference, 48 can be factored into 6 x 8 which yields x = 6 and x+2 =8
Thus the unknown x is equal to 6