The correct option is D (−2,−1)∪(2,3)
Let x2−x−1=t.
Then t(t−6)+5<0
⇒t2−6t+5<0⇒(t−1)(t−5)<0⇒1<t<5
Case 1: t>1
⇒x2−x−1>1
⇒x2−x−2>0
⇒(x+1)(x−2)>0
⇒x∈(−∞,−1)∪(2,∞) ...(1)
Case 2: t<5
⇒x2−x−1<5
⇒x2−x−6<0
⇒(x+2)(x−3)<0
⇒x∈(−2,3) ...(2)
From (1) and (2),
x∈(−2,−1)∪(2,3)