Answer
$f^{-1}(x)=\displaystyle \frac{1}{3}x-\frac{1}{3}$
Work Step by Step
Step 1: Replace $f(x)$ with $y$.
$y=3x+1$
Step 2: Interchange $x$ and $y$.
$x=3y+1$
Step 3: Solve the equation for $y$.
$ x=3y+1,\qquad$ ... add $-1$,
$ x-1=3y,\qquad$ ... multiply with $(\displaystyle \frac{1}{3})$
$\displaystyle \frac{1}{3}x-\frac{1}{3}=y$
Step 4: Replace y with the notation $f^{-1}(x)$.
$f^{-1}(x)=\displaystyle \frac{1}{3}x-\frac{1}{3}$
Graphed using desmos.com/calculator