$Q$ is an integral domain. $K$ is a principal ideal domain. $K \subset Q$ and $Q$ is integral over $K$. Prove that every non-zero prime ideal of $Q$ is maximal.
So we have $P \triangleleft Q$, which is prime, that is if $ab \in P$, than $a \in P$ or $b \in P$ . And Q is integral over K, i.e. for every $q \in Q$ there exist a polynomial over $K$, so that $q$ is root of the polynomial. Plus we have that every prime ideal of K is maximal. Let $p \in P$. Then there exist such $k_i \in K$: $p^{n} + k_{n-1}p^{n-1}+ ... + k_1p + k_0 = 0$ than $p^{n} + k_{n-1}p^{n-1}+ ... + k_1p = -k_0$. So in the left side we got element of $P$, and in the right part is the element of K. What do i get from it?
Note that if $K \subset Q$ is integral and $I \subset Q$ is an ideal, then $K /(K\cap I) \subset Q/I$ is integral. (Just reduce the equation of integral dependence) Following the hint given in the comments by user26857 we need to show two things:
1) If $I \subset Q$ is a non-zero ideal, then $K \cap I$ is non-zero.
2) If $K$ is a field, then $Q$ is a field.
To show 1) we may use the calculation that you did. If $I \subset Q$ is a non-zero ideal, we have an element $p \in I \setminus \{0\}$, then we have $p \cdot (p^{n-1} + k_{n-1}p^{n-2}+ ... + k_1) = -k_0$. Now the LHS is in $K$, the RHS is in $I$, so the element is in $K \cap I$, also as $p$ is not a zero-divisor, the element is non-zero, showing that $K \cap I$ is not the zero ideal.
To show 2), suppose that $K$ is a field and let $p \in Q\setminus \{0\}$, then we have $p^{n} + k_{n-1}p^{n-1}+ ... + k_1p = -k_0$ Now $k_0$ is non-zero by the same argument as above, so as $K$ is a field we may divide by $k_0$ and obtain $\frac{p^{n-1} + k_{n-1}p^{n-2}+ ... + k_1}{-k_0} \cdot p = 1$, as $\frac{p^{n-1} + k_{n-1}p^{n-2}+ ... + k_1}{-k_0}$ is in $Q$, we have that $p$ is invertible, hence $Q$ is a field.
Finally, to show that 1) and 2) imply the statement, note that if $I \subset Q$ is a non-zero ideal, by 1), we have that $K \cap I$ is non-zero, also it is prime, thus as $K$ is a PID $I \cap K$ is maximal, so $K / (K \cap I)$ is a field. Now as $Q/I$ is integral over $K / (K \cap I)$ and $K / (K \cap I)$ is a field, we apply 2) showing that $Q/I$ is a field which implies that $I$ is maximal.