By Pytogaros' Theorem,(however you spell it)
[tex] {a}^{2} = {b}^{2} + {c}^{2} [/tex]
Let the length of shorter leg be x.So the longer leg will be x+2
[tex] {10 }^{2} = {x}^{2} + {(x + 2)}^{2} [/tex]
so you end up with
0=2x^2+4x-96
Solve for x which gives you -8 and 6. So the shorter leg has length of 6 and longer leg has length of 8