a: Vì M nằm trên d1 nên M(x;-x-2)
Theo đề, ta có: \(\dfrac{\left|x\cdot1-3\cdot\left(-x-2\right)+1\right|}{\sqrt{1^2+\left(-3\right)^2}}=3\)
\(\Leftrightarrow\left|x+3x+6+1\right|=3\sqrt{10}\)
\(\Leftrightarrow\left|4x+7\right|=3\sqrt{10}\)
\(\Leftrightarrow\left[{}\begin{matrix}x=\dfrac{3\sqrt{10}-7}{4}\\x=\dfrac{-3\sqrt{10}-7}{4}\end{matrix}\right.\)