\(y=\frac{ksinx+1}{cosx+2}\Leftrightarrow y.cosx+2y=ksinx+1\)
\(\Leftrightarrow k.sinx-ycosx=2y-1\)
\(\Rightarrow k^2+y^2\ge\left(2y-1\right)^2\Leftrightarrow k^2+y^2\ge4y^2-4y+1\)
\(\Leftrightarrow3y^2-4y+1-k^2\le0\)
\(\Delta'=4-3\left(1-k^2\right)=3k^2+1\)
\(\Rightarrow\frac{2-\sqrt{3k^2+1}}{3}\le y\le\frac{2+\sqrt{3k^2+1}}{3}\)
\(\Rightarrow y_{min}=\frac{2-\sqrt{3k^2+1}}{3}>-1\Rightarrow\sqrt{3k^2+1}< 5\)
\(\Rightarrow k^2< 8\Rightarrow-2\sqrt{2}< k< 2\sqrt{2}\)