The $p$-adic metric on $\mathbb{Z}$ is defined as:
$$d_{p}(x,y) = \begin{cases} 0, & \text{if }\;x=y \\ \frac{1}{p^{k(x,y)}}, & \text{if }\;x\neq y \end{cases} $$ where $p$ is prime and $k(x,y)=\max\{i: p^i|x-y\}$
If we have $d_{3}(17,22)$
So $k_{3}(17,22)=\max\{i:3^i|17-22\}=\max\{i:3^i|17-22\}=\max\{i:3^i|-5\}=0$
And $d_{3}(17,22)=\frac{1}{3^0}=1$ ?