Answer
The length is $20$ and the width is $15$.
Work Step by Step
Let $x$ and $y$ be the length and width of the rectangle.
We have the system
$2x+2y=70$
$x^2+y^2=25^2$
Equivalently,
$y=35-x$
$x^2+y^2-625=0$
Substituting the first equation to the second one, we have
$x^2+(35-x)^2-625=0$
$x^2+x^2-70x+1225-625=0$
$2x^2-70x+600=0$ ($\div 2$)
$x^2-35x+300=0$
$(x-20)(x-15)=0$
$x=20$ or $x=15$
If $x=20$, then $y=35-20=15$.
If $x=15$, then $y=35-15=20$.
So, the length is $20$ and the width is $15$.