How to propose a method to construct an automaton?
Your automaton will have $k$ states, one for each possible value of $m$, i.e., one for each of the congruence $(\text{mod } k)$ classes. Exactly one of these states will be marked as the final state, because that will be the one that accepts ocurrences of $\alpha$ that are compatible with $x ( \text{mod } k) =m$.

The transition function will connect states representing congruence classes for $m=a$ and $m=b$ by an arrow labeled with a symbol denoting $c$, if and only if $(a.p +c)\text{ mod } k = b$.

The initial state will be the one corresponding to $m = 0$, assuming leading zeros are allowed.