Proof (minimal polynomial with algebraically independent set)

$I$ is principal

Let $R = k[x_1, \ldots, x_n]$, so $K$ is the field of fractions of $R$.

Consider the kernel $J$ of the $K$-algebra homomorphism $$ \begin{align*} K[t] &\to L \\ t &\mapsto x_{n+1}. \end{align*} $$ Since $J$ is an ideal of the principal ideal domain $K[t]$, it is principal, say generated by a monic polynomial $h\in K[t]$. Moreover $h$ is irreducible: if $h = h_1 h_2$ with neither constant, then $0 = h(x_{n+1}) = h_1(x_{n+1}) h_2(x_{n+1})$ so either $h_1$ or $h_2$ is in $J = (h)$, which is impossible because $\deg h > \deg h_1, \deg h_2$.

Let $b\in R$ be the least common denominator of the coefficients in $h$, so $bh\in R[t]$ and is primitive. By Gauss's lemma, as $bh$ is irreducible in $K[t]$ (because $b$ is a unit in $K[t]$), it is irreducible in $R[t]$.

Since $x_1, \ldots, x_n$ are algebraically independent, $R \isom k[t_1, \ldots, t_n]$ the polynomial ring. Let $f\in k[t_1, \ldots, t_n,t]$ be the unique polynomial such that $f(x_1, \ldots, x_n, t) = bh(t)$. Then $f$ is also irreducible.

To show $I = (f)$, suppose $g\in k[t_1, \ldots, t_n, t]$ is such that $g(x_1, \ldots, x_n, x_{n+1}) = 0$. Then $G(t) := g(x_1, \ldots, x_n, t)\in R[t]$ is in $J$, so $h \mid G$ in $K[t]$ and hence $bh\mid G$ in $K[t]$. Both are in $R[t]$, so by Gauss, $bh\mid G$ in $R[t]$. Therefore $f \mid g$ in $k[t_1, \ldots, t_n, t]$.

If $f$ involves $t_i$

Suppose $f$ involves $t_i$ but $x_1, \ldots, x_{i-1}, x_{i+1}, \ldots, x_n, x_{n+1}$ are not algebraically independent, i.e. there exists a non-zero $g\in I$ which does not involve $t_i$. But $f \mid g$ in $k[t_1, \ldots, t_{n+1}]$, so considering their degrees as a polynomial in one variable $t_i$ (i.e. in $k[t_1, \ldots, t_{i-1}, t_{i+1}, \ldots, t_{n+1}][t_i]$), we obtain $1 \leq \deg_{t_i} f \leq \deg_{t_i} g = 0$, which is impossible.