This is an assignment. There are two related (I think) problems. Please solve one of them and I will try to solve the other.
Let $\alpha, \beta $ be algebraic over $k$ whose irreducible polynomials are $f(x), g(x)$. Suppose $\gcd(\deg(f),\deg(g))=1$. Show that $g(x)$ is irreducible in $k(\alpha)[X]$.
$f(x) \in k[x]$ is irreducible with degree $n$ and let $[K:k]=m$, where $(n,m)=1$. Show that $f$ is irreducible in $K[x]$.
Here is #1: Let $h$ denote the minimal polynomial of $\beta$ in $k(\alpha)[x]$, then $$ [k(\alpha,\beta):k(\alpha)] = \deg(h) $$ But $[k(\alpha):k] = \deg(f)$, so $$ [k(\alpha,\beta):k] = \deg(f)\deg(h) $$ But $[k(\alpha,\beta):k] = [k(\alpha):k][k(\beta):k] = \deg(f)\deg(g)$ since the two field extensions have degrees that are relatively prime. Hence, $$ \deg(h) = \deg(g) $$ But $h\mid g$ in $k(\alpha)[x]$, so $h=g$ must hold.