We can use Pythagorean Theorem.

10^2=(x+2)^2 + x^2.

Then

100=x^2+4x+4+x^2

100=2x^2+4x+4

50=x^2+2x+2

0=x^2+2x-48

then factor

x=6 or x=-8

It cannot be negative since it's a measure of width.

Therefore x=6.

10^2=(x+2)^2 + x^2.

Then

100=x^2+4x+4+x^2

100=2x^2+4x+4

50=x^2+2x+2

0=x^2+2x-48

then factor

x=6 or x=-8

It cannot be negative since it's a measure of width.

Therefore x=6.