We are given
[tex]\frac{k^2-k-2}{k^2-4k-5}[/tex]
Firstly, we will factor numerator and denominator
[tex]\frac{k^2-k-2}{k^2-4k-5}=\frac{(k-2)(k+1)}{(k-5)(k+1)}[/tex]
Restrictions:
we know that denominator can not be zero
so, we can set denominator =0
and solve for k to get restrictions
[tex](k-5)(k+1)=0[/tex]
[tex]k=-1,k=5[/tex]
Simplification:
[tex]\frac{k^2-k-2}{k^2-4k-5}=\frac{(k-2)(k+1)}{(k-5)(k+1)}[/tex]
we can see that k+1 gets cancelled
so, we get
[tex]\frac{k^2-k-2}{k^2-4k-5}=\frac{(k-2)}{(k-5)}[/tex]..........Answer