\(y=ax+b\left(d\right);y=-\dfrac{1}{2}x+\dfrac{1}{2}\left(d'\right)\)
\(\left(d\right)\perp\left(d'\right)\Leftrightarrow-\dfrac{1}{2}a=-1\Leftrightarrow a=2\Rightarrow y=2x+b\left(d\right)\)
Lại có \(\left(d\right)\) đi qua \(A\left(-1;2\right)\Rightarrow2=-2+b\Rightarrow b=4\)
\(\Rightarrow y=2x+4\left(d\right)\)