Notation I use:
$\textbf{R}[x]$ is a set of polynomials of variable x with coefficients in $\textbf{R}$, where $\textbf{R}$ is a ring (usually an integral domain).
Let $\textbf{T}\leq \textbf{S}$ be a field extension and $a\in \textbf{S}$. Than by notation $\textbf{T}(a)$, I mean the smallest field containing all of $\textbf{T}$ and element $a$. So by definition $\textbf{T}\leq \textbf{T}(a) \leq \textbf{S}$. Element $a\in S$ is called algebraic, if $a$ is a root of a polynomial $f\in \textbf{T}[x]$
Let $\textbf{R}\leq \textbf{S}$ be a ring extension and $a\in \textbf{S}$. By $\textbf{R}[a]$ I mean the smallest subring of $\textbf{S}$ containing $\textbf{R}$ and element $a$.
It can be shown that if $\textbf{R}$ is a commutative ring, then $\textbf{R}[a]=\{f(a),f\in \textbf{R}[x]\}$
I know that for polynomials, where $\textbf{R}$ is an integral domain, we have an equality $$(\textbf{R}[x])[y]=\textbf{R}[x,y]$$ Also for fields, if $a$ is algebraic, then $$\textbf{T}(a)=\textbf{T}[a]$$
I wonder if $\textbf{T}\leq \textbf{S}$ is a field extension and $a,b\in \textbf{S}$ are algebraic over $\textbf{T}$, then $$\textbf{T}(a,b)=\textbf{T}(a)(b)$$ In words: if a minimal field extension with elements $a,b$ over a field $\textbf{T}$ is equal to minimal field extension of element $b$ over a field $\textbf{T}(a)$?
This can be solved just from the basic properties of the objects as "smallest", without worrying about explicit representations.
Since $\mathbf{T}(a)(b)$ is a field contained in $\mathbf S$, contains $\mathbf{T}$, $a$, and $b$, it contains the smallest extension of $\mathbf{T}$ that contains $a$ and $b$. Therefore, $$\mathbf{T}(a,b)\subseteq \mathbf{T}(a)(b).$$
Conversely, since $\mathbf{T}(a,b)$ is a field contained in $\mathbf{S}$, and contains $\mathbf{T}$ and $a$, it contains $\mathbf{T}(a)$. So $\mathbf{T}(a)\subseteq \mathbf{T}(a,b)$.
Since $\mathbf{T}(a,b)$ is a field contained in $\mathbf{S}$, containing $\mathbf{T}(a)$ and $b$, it contains the smallest extension of $\mathbf{T}(a)$ that contains $b$, so $$\mathbf{T}(a)(b)\subseteq \mathbf{T}(a,b).$$
The two inclusions give the desired equality.