Extending Homomorphism into Algebraically Closed Field
Solution 1:
The Lemma/Observation that a solution depends on is the following.
Fact. Let $f:K\to\Omega$ be a homomorphism of fields were $\Omega$ is algebraically closed. Assume that $\alpha$ is an element of some algebraic extension field $L$ of $K$. Then there exists a homomorphism of fields $\tilde{f}:K[\alpha]\to\Omega$ such that $f(z)=\tilde{f}(z)$ for all $z\in K$.
Proof. Let $m(x)=\sum_{i=0}^na_ix^i\in K[x]$ be the minimal polynomial of $\alpha$. Consider the polynomial $$ \overline{m}(x)=\sum_{i=0}^nf(a_i)x^i\in\Omega[x]. $$ Because $\Omega$ is algebraically closed, there exists an element $\beta\in\Omega$ such that $\overline{m}(\beta)=0$. Consider the mapping $$ F:K[x]\to\Omega, p(x)=p_0+p_1x+\cdots p_tx^t\mapsto \sum_{i=0}^tf(p_i)\beta^i. $$ This is the composition of two mappings. The extension of $f$ to a map between polynomial rings $K[x]\to \Omega[x]$ followed by evaluation of polynomials in $\Omega[x]$ at $\beta$. Both of these mappings are homomorphism of rings. Thus the same holds for their composition $F$. We see that the irreducible polynomial $m(x)$ is in the kernel of $F$. Hence the ideal $I\subset K[x]$ generated by $m(x)$ is also contained in $\ker F$. But irreducibility of $m(x)$ implies that $I$ is a maximal ideal of $K[x]$, so we can conclude that $I=\ker F$. Thus $F$ induces an isomorphism $\overline{F}$ from $K[x]/I$ to a subring of $\Omega$. Here $K[x]/I$ is a field isomorphic to $K[\alpha]$. Composing the inverse of that isomorphism gives us the desired homomorphism $$ \tilde{f}:K[\alpha]\cong K[x]/I\to\Omega. $$ Q.E.D.
Your claim follows from this by a typical application of Zorn's Lemma. Consider the set $E$ of pairs $(\ell,\phi)$, where $\ell$ is a field such that $k\subseteq \ell\subseteq k'$ and $\phi$ is a homomorphism of fields $\phi:\ell\to\Omega$ such that $\phi(z)=g(z)$ for all $z\in k$. We say that $(\ell',\phi')$ is an extension of $(\ell,\phi)$, if $\ell\subseteq\ell'$ and $\phi'(z)=\phi(z)$ for all $z\in \ell$. Denote $(\ell,\phi)\prec(\ell',\phi')$. Clearly this is a partial order of $E$: if $(\ell,\phi)\prec(\ell',\phi')$ and $(\ell',\phi')\prec(\ell'',\phi'')$ then $(\ell,\phi)\prec(\ell'',\phi'')$.
Claim. Every chain in $E$ has an upper bound.
Proof. If $C=\{(\ell_i,\phi_i)\mid i\in I\}$ is a chain in $E$, then let $$k_C=\bigcup_{i\in I}\ell_i\subseteq k'$$ be the union of the fields occuring in the chain $C$. For any $z\in k_C$ we define $\phi_C(z)$ as follows. The element $z$ belongs to at least one of the fields $\ell_i, i\in I$. We declare $\phi_C(z)=\phi_i(z)$. This is well-defined, because if we also have $z\in\ell_j$ for some $j\in I, j\neq i$, then by the chain property we have either $(\ell_i,\phi_i)\prec (\ell_j,\phi_j)$ or $(\ell_j,\phi_j)\prec (\ell_i,\phi_i)$. In either case this implies that $\phi_i(z)=\phi_j(z)$.
Furthermore, the mapping $\phi_C$ is a homomorphism of fields. For if $z_1,z_2\in k_C$ are arbitrary, then $z_1\in \ell_{i}$ and $z_2\in\ell_j$ for some $i,j\in I$. Again, one of the fields $\ell_i,\ell_j$ contains the other, so the homomorphic condition follows from well-definedness of $\phi_C$ and the fact that the "bigger" one, either $\phi_i$ or $\phi_j$, is a homomorphism.
Clearly $(\ell_i,\phi_i)\prec(k_C,\phi_C)$ for all $i\in I$, so the pair $(k_C,\phi_C)$ is an upper bound of the chain $C$. Q.E.D.
The main claim follows from this. By Zorn's Lemma the set $E$ has a maximal element $(\ell_M,\phi_M)$. If here $\ell_M$ were a proper subfield of $k'$, then we would have that $k'$ is an algebraic extension of $\ell_M$. Hence the Fact applied to $K=\ell_M$ and to any element $\alpha\in k'\setminus \ell_M$ would allow us to further extend the homomorphism $\ell_M$ to the field $\ell_M[\alpha]$ contradicting the maximality of $(\ell_M,\phi_M)$. Thus $\ell_M=k'$, and the homomorphism $\phi_M$ is your $g'$.