Ta có \(M\left(2;-1\right)\)
Gọi phương trình đường thẳng d qua M có dạng: \(y=ax+b\)
\(\Rightarrow-1=2a+b\Rightarrow b=-2a-1\)
\(\Rightarrow y=ax-2a-1\)
Để d cắt 2 trục tọa độ \(\Rightarrow a\ne\left\{0;-\dfrac{1}{2}\right\}\)
\(\Rightarrow A\left(\dfrac{2a+1}{a};0\right)\) ; \(B\left(0;-2a-1\right)\) \(\Rightarrow OA=\left|x_A\right|=\left|\dfrac{2a+1}{a}\right|\) ; \(OB=\left|y_B\right|=\left|2a+1\right|\)
Ta có: \(S_{OMA}=\dfrac{1}{2}\left|y_M\right|.OA=\dfrac{1}{2}\left|\dfrac{2a+1}{a}\right|\)
\(S_{OMB}=\dfrac{1}{2}\left|x_M\right|.OB=\left|2a+1\right|\)
\(\Rightarrow\dfrac{1}{2}\left|\dfrac{2a+1}{a}\right|=\left|2a+1\right|\Leftrightarrow\dfrac{1}{2\left|a\right|}=1\Rightarrow\left[{}\begin{matrix}a=\dfrac{1}{2}\\a=-\dfrac{1}{2}\left(loại\right)\end{matrix}\right.\)
Phương trình: \(y=\dfrac{1}{2}x-2\)