\[ F(s)=\frac{3s+1}{(s-1)(s^2+1)}. \] We seek $f(t)=\mathcal{L}^{-1}\{F(s)\}$.
Assume \[ F(s)=\frac{A}{s-1}+\frac{Bs+C}{s^2+1}. \] Multiply through by $(s-1)(s^2+1)$ and equate coefficients: \[ 3s+1 = A(s^2+1) + (Bs+C)(s-1). \] Expanding, \[ 3s+1 = (A+B)s^2 + (C-B)s + (A-C). \] Matching coefficients of $s^2, s,$ and the constant term gives \[ A+B=0,\quad C-B=3,\quad A-C=1. \] Solving yields \[ A=2,\qquad B=-2,\qquad C=1. \]
\[ F(s)=\frac{2}{s-1}+\frac{-2s+1}{s^2+1}. \]
Using the standard pairs $\,\mathcal{L}^{-1}\{\tfrac{1}{s-a}\}=e^{at}$, $\,\mathcal{L}^{-1}\{\tfrac{s}{s^2+1}\}=\cos t$, and $\,\mathcal{L}^{-1}\{\tfrac{1}{s^2+1}\}=\sin t$, we get \[ f(t)= 2e^{t} - 2\cos t + \sin t. \]