step 1
Remember that
If two lines are perpendicular, then their slopes are negative reciprocal
so
we have the line
[tex]y=\frac{1}{3}x+2[/tex]The slope is m=1/3
therefore
The slope of the perpendicular line is m=-3
step 2
Find out the equation of the line in slope-intercept form
[tex]y=mx+b[/tex]we have
m=-3
point (3,1)
substitute and solve for b
[tex]\begin{gathered} 1=-3(3)+b \\ 1=-9+b \\ b=1+9 \\ b=10 \end{gathered}[/tex]substitute
[tex]y=-3x+10[/tex]