We observe that $K$ has no root of $f$, so we just let $x$ be a root (this corresponds to looking at $K[X]$). Well if $x$ needs to be a root then $f(x)$ better be $0$, so let's just quotient by $f(x)$ in order to make $f(x)=0$ (this corresponds to looking at $K[X]/(f)$).