Since \(L\) is algebraic over \(K(y_1,\dots,y_n)\text{,}\) for each \(i\) there is some \(p_i(t)\in K(y_1,\dots,y_n)[t]\) such that \(p_i(x_i)=0\text{.}\) We can clear denominators to assume without loss of generality that \(p_i(x_i)\in K[y_1,\dots,y_n][t]\text{.}\)
We claim that there is some \(i\) such that \(p_i(t) \notin K[y_2,\dots,y_n][t]\text{.}\) If not, then
\begin{equation*}
p_i(t) \in K[y_2,\dots,y_n][t]
\end{equation*}
for all \(i\text{,}\) and thus that each \(x_i\) is algebraic over \(K(y_2,\dots,y_n)\text{.}\) Thus, \(K(x_1,\dots,x_m)\) is algebraic over \(K(y_2,\dots,y_n)\text{,}\) and since \(L\) is algebraic over \(K(x_1,\dots,x_m)\text{,}\) \(y\) is algebraic over \(K(y_2,\dots,y_n)\text{,}\) which contradicts that \(\{y_1,\dots,y_n\}\) is a transcendence basis. This shows the claim.
Now, we claim that for such \(i\text{,}\) \(\{x_i,y_2,\dots,y_n\}\) is a transcendence basis. Thinking of the equation \(p_i(x_i)=0\) as a polynomial expression in \(K[x_i,y_2,\dots,y_n][y_1]\text{,}\) \(y_1\) is algebraic over \(K(x_i,y_2,\dots,y_n)\text{,}\) hence \(K(y_1,\dots,y_n)\) is algebraic over \(K(x_i,y_2,\dots,y_n)\text{,}\) and \(L\) as well.
If \(\{x_i,y_2,\dots,y_n\}\) were algebraically dependent, then there is some polynomial equation \(p(x_i,y_2,\dots,y_n)=0\text{.}\) This equation must involve \(x_i\text{,}\) since \(y_2,\dots,y_n\) are algebraically independent. We would then have \(K(x_i,y_2,\dots,y_n)\) is algebraic over \(K(y_2,\dots,y_n)\text{.}\) But since \(y_1\) is algebraic over \(K(x_i,y_2,\dots,y_n)\text{,}\) we would have that \(K(y_1,\dots,y_n)\) is algebraic over \(K(y_2,\dots,y_n)\text{,}\) which would contradict that \(y_1,\dots,y_n\) is a transcendence basis.