Q:

Prove that if $q\mid x$ and $q^k\parallel x^p$ then $p\mid k$.

Suppose $p\neq q$ are distinct primes, and $x\in\mathbb{Z}$. Suppose further, that $q\mid x$, and that there is an integer $k\in\mathbb{Z}$ such that $q^{k}\mid x^{p}$ and $q^{k+1}\nmid x^{p}$.
Is it always true that $k$ is a multiple of $p$?
Firstly, it is clear that $q^{p}\mid x^{p}$, so that $p\le k$. However from here I cannot conclude anything...

A:

$$\begin{align} q^{\large k}\mid\mid x^{\large p}\ \Rightarrow\, \, \ q^{\large k}\ \color{#c00}n &\,=\, x^{\large p},\,\ \ \color{#c00}{q\nmid n},\,  \ \text{so comparing powers of $\,q$}\\[.2em]
\Rightarrow\  k+ \color{#c00}0 &\,=\, p\  \nu_q(x),\ \ \ {\rm so}\ \ \   p\,\mid\, k &
\end{align}$$

