If both the roots of the quadratic equation x2-2kx+k2+k-5=0 are less than 5, then k lies in the interval.
x2 - 2kx + k2 + k - 5 = 0
Roots are less than 5, D ≥ 0
4k2 - 4 (k2 + k - 5) ≥ 0 ............(i)
⇒ k ≤ 5
f(5) > 0 ..........(ii)
25-10k+k2+k-5>0
k2-9k+20>0 ⇒ (k-5)(k-4)>0
⇒ k ∈ (-∞, 4) ∪ (5, ∞): -( 2k2 ) < 5 ⇒ k<5 .................(iii)
from (i), (ii) and (iii), k ∈ (-∞, 4)