Let, P≡(a2,a+1), L1:3x−y+1=0 and L2:x+2y−5=0.
Now, origin and P lies on the same side with respect to line L1.
⇒L1(0)⋅L1(P)>0
⇒3(a2)−(a+1)+1>0

⇒3a2−a>0
⇒a(3a−1)>0

⇒a∈(−∞,0)∪(31,∞)...(i)
Now, L2:x+2y−5=0
Origin and P lies on same side with respect to L2
⇒L2(0)⋅L2(P)>0
⇒a2+2(a+1)−5<0
⇒a2+2a−3<0
⇒(a+3)(a−1)<0

∴a∈(−3,1)...(ii)
Using intersection of \left(i\right)\text{and}\left(ii\right),</p><p><imgsrc="https://cdn−question−pool.getmarks.app/pyq/jeemain/20af40c9−608a−4ef2−a447−b8e2a6e5b72d.png"style="width:470px;height:174px;"/></p><p>⇒ a \in ( - 3, 0 ) \cup \left(\dfrac{1}{3}, 1\right)$