Answer
Length: $12$ feet
Width: $5$ feet
Work Step by Step
The dimensions of the closet's base are:
$$\begin{align*}
&\text{Length:}& 2x+2\\
&\text{Width:}& x.\\
\end{align*}$$
We use the Pythagorean theorem to calculate $x$:
$$\begin{align*}
x^2+(2x+2)^2&=13^2\quad&&\text{Apply the Pythagorean theorem.}\\
x^2+4x^2+8x+4-169&=0\quad&&\text{Subtract }169\text{ from each side.}\\
5x^2+8x-165&=0\quad&&\text{Simplify.}\\
(x-5)(5x+33)&=0\quad&&\text{Factor.}\\
x-5=0&\text{ or }5x+33=0\quad&&\text{Set each factor to }0.\\
x=5&\text{ or }x=-\dfrac{33}{5}\quad&&\text{Solve for }x.
\end{align*}$$
As $x$ is a dimension, it must be positive, so the only solution is $x=5$.
Calculate the dimensions of the triangle:
$$\begin{align*}
&\text{Length:}& 2x+2=2(5)+2=12\\
&\text{Width:}& x=5.
\end{align*}$$