$\!\bmod 5\!:\ 1/3\equiv 6/3\equiv 2\,$ so you can clear denonimators. But it is much easier done as below.
Tip $ $ Divide fraction-free by scaling the divisor to be monic (lead coef $=1)$ then adjust the result.
Here, long divide $\,f\,$ by $\,2g\equiv x\!-\!1\,$ then double its quotient $\,\color{#C00}{q'=q/2}\,$ to get $\,\color{#0a0}q$
$$\begin{align}\bmod 5\!:\ \ \ \ f\, &\equiv\, \ \ \overbrace{(\color{#c00}{x^2+x-\!2})\,\ (x-1)}^{\Large \color{#c00}{q/2}\,\ \times\,\ 2g\ \,} + 2\\[.2em]
&\equiv\, \underbrace{(\color{#0a0}{2x^2\!+\!2x\!+\!1})(3x+2)}_{\Large\ \color{#0a0}q\,\ \times\,\ g^{\phantom{:}}} + 2\end{align}\qquad\qquad$$
adjusting $\,\color{#0a0}q \equiv 2(\color{#c00}{q/2})$ $\equiv 2(\color{#c00}{x^2\!+\!x\!-\!2}) \equiv \color{#0a0}{2x^2\!+2x\!+\!1},\ $ i.e. $\ f = \color{#c00}{q'} (2g)+r = \color{#0a0}{2q'}g + r$
Remark $ $ We can view this method as conjugating non-monic division into monic division (similar to how the AC-method reduces factorization of non-monic to monic polynomials by conjugation, i.e. scale the problem to the monic case, then invert the scaling at the end, i.e. $\,\cal F f\, = a^{-1}\cal F\, a\,f,\,$ where $\cal F$ is the factorization algorithm).