Answer
a) ${{f}^{-1}}\left( x \right)=\frac{x+1}{3}$
b) they are inverses
Work Step by Step
(a)
Consider the function, $f\left( x \right)=3x-1$
Step-1-Replace $f\left( x \right)$ with $y$ in $f\left( x \right)$
$\begin{align}
& f\left( x \right)=3x-1 \\
& y=3x-1
\end{align}$
Step-2-Interchange $x$ and $y$
$\begin{align}
& y=3x-1 \\
& x=3y-1 \\
\end{align}$
Step-3-Solve for $y$. Add $1$ to each side
$\begin{align}
& x=3y-1 \\
& x+1=3y-1+1 \\
& x+1=3y
\end{align}$
Divide each side by $3$
$\begin{align}
& x+1=3y \\
& \frac{x+1}{3}=\frac{3y}{3} \\
& \frac{x+1}{3}=y
\end{align}$
Step-4-Replace $y$ in step 3 by ${{f}^{-1}}\left( x \right)$
$\begin{align}
& y=\frac{x+1}{3} \\
& {{f}^{-1}}\left( x \right)=\frac{x+1}{3}
\end{align}$
Therefore, the required inverse of the function is ${{f}^{-1}}\left( x \right)=\frac{x+1}{3}$
(b)
Consider the functions:
$f\left( x \right)=3x-1$ and ${{f}^{-1}}\left( x \right)=\frac{x+1}{3}$
Replace $x$ with ${{f}^{-1}}\left( x \right)$
$\begin{align}
& f\left( {{f}^{-1}}\left( x \right) \right)=3{{f}^{-1}}\left( x \right)-1 \\
& =3\left( \frac{x+1}{3} \right)-1
\end{align}$
Simplify
$\begin{align}
& f\left( g\left( x \right) \right)=3\left( \frac{x+1}{3} \right)-1 \\
& =x+1-1 \\
& =x
\end{align}$
Now, find ${{f}^{-1}}\left( f\left( x \right) \right)$
The equation for ${{f}^{-1}}\left( x \right)$ is given as:
${{f}^{-1}}\left( x \right)=\frac{x+1}{3}$
Replace $x$ with $f\left( x \right)$
$\begin{align}
& {{f}^{-1}}\left( f\left( x \right) \right)=\frac{f\left( x \right)+1}{3} \\
& =\frac{\left( 3x-1 \right)+1}{3}
\end{align}$
Simplify
$\begin{align}
& {{f}^{-1}}\left( f\left( x \right) \right)=\frac{\left( 3x-1 \right)+1}{3} \\
& =\frac{3x}{3} \\
& =x
\end{align}$
Thus, $f\left( {{f}^{-1}}\left( x \right) \right)=x$ and ${{f}^{-1}}\left( f\left( x \right) \right)=x$
It can be easily observed that ${{f}^{-1}}$ can be expressed in $f$ if we add 3 and divide by 3.
Hence, the functions $f$ and \[{{f}^{-1}}\] are inverses of each other.