$B$ spans algebraically $E$ over $F$ Let $E/F$ be an extension, $S=\{a_1,\ldots,a_n\}\subseteq E$ algebraically independent over $F$ and $S\subseteq T$, $T$ a subset of $E$, that spans $E$ algebraically over $F$. 
I want to show that there exists a set $B$ between $S$ and $T$, that is a trancendental basis of $E/F$, as follows: 
Let $T\setminus S=\{\beta_1,\ldots ,\beta_m\}$. 
If $T=\varnothing$, then $B=S$ is the trancendental basis. 
Otherwise, we define $S_0=S$ and for $i=1,\ldots ,m$
$S_i=\left\{\begin{matrix} S_{i-1} & \text{ if } \beta_i \text{ is algebraic } /F(S_{i-1})\\  S_{i-1}\cup \{\beta_i\} & \text{ if } \beta_i \text{ is not algebraic } /F(S_{i-1})  \end{matrix}\right.$ 
I want to show that that $B=S_m$ is the trancendental basis of $E/F$. 
$$$$ 
I have shown that $S_m$ is $F$-algebraically independent. 
So, it is left to show that $S_m$ spans algebraically $E$ over $F$. Could you give me some hints how we could show that? 

$$$$ 
EDIT: 
To show that $S_m$ spans algebraically $E$ over $F$, we have to show that $E/F(S_m)$ is algebraic, right? 
We have that the extension $E/F(T)$ is algebraic.  
It holds that $S_m\subseteq T$, or not? 
Do we know if $F(S_m)\leq F(T)$ or $F(T)\leq F(S_m)$ ? 
 A: First of all, in order for the proof to work the way you've written it, you have to assume $T$ is finite to begin with (and hence that the transcendence degree of $E/F$ is finite). If you want to prove this in the generality that it's stated in the first paragraph (i.e. for extensions of arbitrary transcendence degree), you'll need to use Zorn's Lemma.
Second, addressing the questions in your edit: Of course $S_m\subseteq T$. Isn't that clear from its construction? It contains all of $S$ and some of the $\beta_i$. And since $S_m\subseteq T$, $F(S_m)$ is a subfield of $F(T)$. 
What we want to show to finish your proof is that $E$ is algebraic over $F(S_m)$. It suffices to show that each element of $T$ is algebraic over $F(S_m)$, since then $F(T)$ is algebraic over $F(S_m)$, and hence $E$ is algebraic over $F(S_m)$. 
[We're using two basic facts here, make sure you know why they're true: 1. If $x$ is algebraic over $K$, then $K(x)$ is an algebraic extension of $K$. 2. If $K''/K'$ and $K'/K$ are both algebraic extensions, then $K''/K$ is an algebraic extension.]
But for every $x\in T$, either $x\in S = S_0\subseteq S_m$, or  $x= \beta_i$ is not algebraic over $F(S_{i-1})$ (in which case $x\in S_i \subseteq S_m$), or $x = \beta_i$ is algebraic over $F(S_{i-1})\subseteq F(S_m)$. In any case, $x$ is algebraic over $F(S_m)$.
