he formula of a distance between a point (a, b)
and a line Ax + By + C = 0:
[tex]d=\dfrac{|Aa+Bb+C|}{\sqrt{A^2+B^2}}[/tex]
We have the point A(-1, 7) → a = -1, b = 7
and the line y = 3x → 3x - y = 0 → A = 3, B = -1, C = 0.
Substitute:
[tex]d=\dfrac{|(3)(-1)+(-1)(7)+0|}{\sqrt{3^2+(-1)^2}}=\dfrac{|-3-7|}{\sqrt{9+1}}=\dfrac{|-10|}{\sqrt{10}}=\dfrac{10\sqrt{10}}{\sqrt{10}\cdot\sqrt{10}}\\\\=\dfrac{10\sqrt{10}}{10}=\sqrt{10}[/tex]