Note that since $\displaystyle f:K\to K$ is continuous so is the mapping $\displaystyle \text{id}\oplus f:K\to K\times K:k\mapsto (k,f(k))$ (to see this look at the projections). But, it is an elementary fact that the mapping
$\displaystyle d:K\times K\to \mathbb{R}
k_1,k_2)\mapsto d_K(k_1,k_2)$ is continuous. It then follows that $\displaystyle d\circ\left(\text{id}\oplus f\right):K\to\mathbb{R}:k\overset{\text{id}\oplus f}{\longmapsto}(k,f(k))\overset{d}{\longmapsto} d(k,f(k))$ is continuous. In particular, by the compactness of $\displaystyle K$ and
the extreme value theorem the mapping $\displaystyle d\circ\left(\text{id}\oplus f\right)$ assumes a minimum at some point $\displaystyle k_0\in K$. Now, assume that $\displaystyle d\circ\left(\text{id}\oplus f\right)(k_0)=d(k_0,f(k_0))\ne 0$. Then,
$\displaystyle d(f(f(k_0)),f(k_0))\leqslant A\text{ }d(k_0,f(k_0))<d(k_0,f(k_0))$ which contradicts the minimality of $\displaystyle k_0$