An irreducible polynomial of degree coprime to the degree of an extension is irreducible over this extension
Let $u$ be a root of $f(x)$. Then $[\mathbb{Q}(u):\mathbb{Q}] = n$. Now consider $K(u)$. We know that $[K(u):K]\leq n$, since the monic irreducible of $u$ over $K$ divides $f$. Since $$[K(u):\mathbb{Q}] = [K(u):K][K:\mathbb{Q}] = m[K(u):K]\leq mn$$ and $$[K(u):\mathbb{Q}] = [K(u):\mathbb{Q}(u)][\mathbb{Q}(u):\mathbb{Q}] = n[K(u):\mathbb{Q}(u)]$$ then $[K(u):\mathbb{Q}]$ is at most $nm$, is a multiple of $n$, and is a multiple of $m$. Since $\gcd(n,m)=1$, it follows that $[K(u):\mathbb{Q}]=nm$, so the degree $[K(u):K]$ is equal to $n$.
What does that imply about the monic irreducible of $u$ over $K$ and about $f$?