Đặt \(x^2-\left(2m+1\right)x+m^2+m=0\)
\(\Delta=\left(2m+1\right)^2-4\left(m^2+m\right)=1\)
Phương trình có 2 nghiệm: \(\left\{{}\begin{matrix}x_1=\frac{2m+1-1}{2}=m\\x_2=\frac{2m+1+1}{2}=m+1\end{matrix}\right.\)
\(-2< x_1< x_2< 4\)
\(\Leftrightarrow-2< m< m+1< 4\)
\(\Rightarrow-2< m< 3\)