Answer
$f^{-1}(x)=\dfrac{x-1}{3}$
Work Step by Step
The given function, $
f(x)=3x+1
,$ is equivalent to
\begin{array}{l}\require{cancel}
y=3x+1
.\end{array}
Interchanging the $x$ and $y$ variables and then solving for $y$ result to
\begin{array}{l}\require{cancel}
x=3y+1
\\\\
x-1=3y
\\\\
\dfrac{x-1}{3}=y
\\\\
y=\dfrac{x-1}{3}
.\end{array}
Hence, the inverse is $
f^{-1}(x)=\dfrac{x-1}{3}
.$
In the graph above, the black graph is the graph of $f(x)$ and the red graph is the graph of $f^{-1}(x).$