step 1
Remember that
If two lines are perpendicular, then their slopes are negative reciprocal
so
we have the line
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
we have
m=-3
point (3,1)
substitute and solve for b
substitute