Sorry if this is a duplicate, I couldn't find anything on here with $m,n$ not being coprime.
My attempt thus far: first observe that $[k(\alpha):k]=m$, $[k(\beta):k]=n$.
Since $(k(\alpha,\beta):k(\alpha))$, $(k(\alpha,\beta):k(\beta))$ are finite extensions they are algebraic and we have $[k(\alpha,\beta):k(\alpha)]= k_1$ and $[k(\alpha,\beta):k(\beta)]= k_2$ for some $k_1,k_2$
Therefore $[k(\alpha,\beta):k]=mk_1=nk_2$ and $n\vert mk_1$ and $m\vert nk_2$.
But I don't see how to conclude though that its less than $nm$, Any hints would be appreciated
Hint: Since $k[x] \subseteq k(\alpha)[x],$ it follows that $[k(\alpha,\beta) : k(\alpha)] \leq [k(\beta) : k]$