Given line is
$y=3 x-1$
$\therefore $ Slope of the given line $=3$
$\therefore $ Slope of a line perpendicular to the given line $=-\frac{1}{3}$
$\therefore $ Equation of required line will be
$ y-2 =\frac{-1}{3}(x-1) $
$\Rightarrow 3 y-6 =-x+1 $
$\Rightarrow x+3 y -7 =0$