y=(m+2)x-4
=>(m+2)x-y-4=0
\(d\left(O;d\right)=\dfrac{\left|0\cdot\left(m+2\right)+0\cdot\left(-1\right)-4\right|}{\sqrt{\left(m+2\right)^2+1}}=\dfrac{4}{\sqrt{\left(m+2\right)^2+1}}\)
Để d=2 thì \(\sqrt{\left(m+2\right)^2+1}=2\)
=>(m+2)^2+1=4
=>(m+2)^2=3
hay \(m=\pm\sqrt{3}-2\)