$a f(a)=1\,$ in $\Bbb Q(a)\!\iff\! x\color{#c00}{f(x)}= 1\,$ in $\,\Bbb Q[x]/g(x)\,\cong\, \Bbb Q[x]\bmod{\!g(x)}$
$\!\!\bmod g\!:\,\ 0\equiv -g/4 = x(\color{#c00}{-x^3/4\!+\!4x})-1 \,\Rightarrow\, f\equiv\, \color{#c00}\cdots \,$ by uniqueness of inverses.
Remark $\ $ Generally we can read off inverse of $\:a \ne 0\:$ from its minimal polynomial $\:f(x)\in F[x],\:$ viz. $\,f(x) = g(x)x-c\,\Rightarrow\, c^{-1}g(x)\,x = 1\,\Rightarrow c^{-1}g(a)a = 1\,\Rightarrow\, a^{-1} = c^{-1}g(a)\,$
This is a special case of using the Euclidean algorithm to compute inverses via the Bezout identity, viz. $\: (x,f(x)) = 1\ \Rightarrow\ g(x)\ x + b(x)\ f(x) = 1\ $ so $\: g(a)\ a = 1\ $ by evaluating at $\rm\:x = a.\:$
This can be viewed as generalization of rationalizing denominators in low-degree extensions, i.e. we can compute an inverse of $\,a\:$ by "rationalizing" (to $\rm\:F)\,$ the denominator of $\:1/a,\:$ which can also be done using norms (computed e.g. by resultants, etc). See here for much further discussion.