If $(x^2-5x+4)(y^2+y+1)<2y$ for all real $y$, then $x$ belongs to the interval $(2,b)$, then $b$ can be?
$$y^2(x^2-5x+4)+y(x^2-5x+2)+(x^2-5x+4)<0$$
As it is true for all real y, hence $D<0$
$$(x^2-5x+2)^2-4(x^2-5x+4)^2<0$$
Let $x^2-5x=u$
$$(u+2)^2-4(u+4)^2<0$$ $$u^2+4+4u-4(u^2+16+8u)<0$$ $$-3u^2-28u-60<0$$ $$3u^2+28u+60>0$$ $$3u^2+18u+10u+60>0$$ $$(3u+10)(u+6)>0$$
Back substituting u $$(3x^2-15x+10)(x^2-5x+6)>0$$ $$\left(x-\dfrac{15+\sqrt{225-120}}{6}\right)\left(x-\dfrac{15-\sqrt{225-120}}{6}\right)(x-2)(x-3)>0$$ $$x\in\left(-\infty,\dfrac{15+\sqrt{105}}{6}\right)\cup(2,3)\cup\left(\dfrac{15+\sqrt{105}}{6},\infty\right)$$
But in the question it is given $x\in(2,b)$, what mistake am I making here.
It is only necessary that the discriminant is less than $0$; not sufficient. We also need that the leading coefficient is $<0$ (otherwise the quadratic is $>0$ for all $y$). Thus, we also require
$$x^2-5x+4<0\implies 1<x<4.$$
Intersecting this with what you got gives the interval $(2,3)$.