If a and b are algebraic over F and F(a) = F(b), then a and b have the same degree over F

Let $F$ be a field and $E$ an extension of $F$. Suppose $a,b \in E$ are algebraic over $F$ and that $F(a) = F(b)$. Prove that $a$ and $b$ have the same degree over $F$.

Note that $b \in F(a)$. By Theorem 4.9 in TAN, $\mathsf{deg}_F(b) \leq \mathsf{deg}_F(a)$. Similarly, $\mathsf{deg}_F(a) \leq \mathsf{deg}_F(b)$. Hence $\mathsf{deg}_F(a) = \mathsf{deg}_F(b)$.