Answer
Short leg: $3.1$ feet
Long leg: $5.1$ feet
Work Step by Step
Let's note:
$s$=the shorter leg
$l$=the longer leg
$h$=the hypotenuse
We are given:
$$\begin{align*}
h&=6\\
s&=l-2\
\end{align*}$$
Use the Pythagorean theorem:
$$\begin{align*}
h^2&=s^2+l^2\\
6^2&=(l-2)^2+l^2\\
36&=l^2-4l+4+l^2\\
0&=2l^2-4l+4-36\\
0&=2l^2-4l-32\\
0&=l^2-2l-16.
\end{align*}$$
Solve the equation using the Quadratic Formula:
$$\begin{align*}
l^2-2l-16&=0\\
l&=\dfrac{-(-2)\pm\sqrt{(-2)^2-4(1)(-16)}}{2(1)}\\
&=\dfrac{2\pm 8.25}{2}\\
l_1&\approx -3.1\\
l_2&\approx 5.1.
\end{align*}$$
As $l>0$, the only solution is $l=5.1$.
Determine $s$:
$$\begin{align*}
s&=l-2=5.1-2=3.1\
\end{align*}$$