I'm struggling to understand a part of the proof of the following proposition from Atiyah-Macdonald's 'Introduction to Commutative Algebra':
Let $A \subseteq B$ be integral domains, $B$ finitely generated over $A$ (as an $A$-module). Let $v$ be a non-zero element of B. Then there exists $u \neq 0$ in $A$ with the following property: any homomorphism $f$ of $A$ into an algebraically closed field $\Omega$ such that $f(u) \neq 0$ can be extended to a homomorphism $g$ of $B$ into $\Omega$ such that $g(v) \neq 0$.
They treat the case of $B$ being generated by a single element $x$ over $A$ and $x$ being algebraic over $A$ (i.e. algebraic over the field of fractions of $A$). Let $v = a_0x^n + \dots + a_n$. Then $v^{-1}$ is algebraic over $A$, since $v$ is a polynomial in $x$. Hence there are equations
$$a_0x^m + \dots + a_m = 0\\ a_0'v^{-n} + \dots + a_n' = 0$$
where $a_i,a_j' \in A$. Let $f: A \to \Omega$ be such that $f(u) \neq 0$. Now here is the part that I don't quite understand: They claim that $f$ can be extended to a homomorphism $f_1: A[u^{-1}] \to \Omega$ by setting $f_1(u^{-1}) = f(u)^{-1}$. The hypothesis only states that $B$ is finitely generated, not that it's a free $A$-module, hence the definition of $f_1$ doesn't make sense if there are multiple ways to write elements of $A[u^{-1}]$. What am I missing?