Let y=f(x)
[tex]\\ \rm\Rrightarrow y=3^x+1[/tex]
[tex]\\ \rm\Rrightarrow x=3^y+1[/tex]
[tex]\\ \rm\Rrightarrow lnx=ln(3^y+1)[/tex]
[tex]\\ \rm\Rrightarrow x=\dfrac{ln(y-1)}{ln3}[/tex]
Again interchange
[tex]\\ \rm\Rrightarrow f^{-1}(x)=\dfrac{ln(x-1)}{ln3}[/tex]