First let's factor all the numerators and denominators.
\(\frac{r^2-5r+4}{r^2-8r+7}\,=\,\frac{r^2-2r-15}{r^2-r-20} \\~\\ \frac{(r-4)(r-1)}{(r-7)(r-1)}\,=\,\frac{(r-5)(r+3)}{(r-5)(r+4)} \)
Now we can reduce both fractions.
\(\frac{(r-4)}{(r-7)}\,=\,\frac{(r+3)}{(r+4)}\) and r ≠ 1 , r ≠ 5
Multiply both sides of the equation by (r - 7) , and multiply both sides by (r + 4) .
(r - 4)(r + 4) = (r + 3)(r - 7) and r ≠ 7 , r ≠ -4
r2 - 16 = r2 - 4r - 21
Subtract r2 from both sides.
-16 = -4r - 21
Add 21 to both sides.
5 = -4r
Divide both sides by -4 .
\(-\frac54\) = r This is not a restrited value, so this is the solution.