Answer
See below.
Work Step by Step
Let $x$ be the width, then $x+2$ is the length, then by Pythagorean's Theorem our equation is: $x^2+(x+2)^2=10^2\\x^2+x^2+4x+4=100\\2x^2+4x-96=0\\x^2+2x-48=0\\x^2+8x-6x-48=0\\x(x+8)-6(x+8)=(x+8)(x-6)=0$
Thus $x=-8$ or $x=6$ but it must be positive, so the width is $6$ and the length is $8$.