Approach №1. Consider continuous function
$$
d: A\times A\to\mathbb{R}: (a_1,a_2)\mapsto d(a_1,a_2)
$$
defined on compact $A\times A$. Recall that each continuous function defined on compact attains its maximum.
Approach №2. Let $D=\mathrm{diam} (A)=\sup\{d(x,y):x,y\in A\}$, then from definition of $\sup$ it follows that there exist a sequence $\{(x_n,y_n):n\in\mathbb{N}\}\subset A\times A$, such that $D=\lim_{n\to\infty}d(x_n,y_n)$. Since $A\times A$ is compact we have convergent subsequence $\{(x_{n_k},y_{n_k}):k\in\mathbb{N}\}$ which converges to some $(a_1,a_2)\in A\times A$. Then we get
$$
\mathrm{diam}(A)=D=\lim\limits_{n\to\infty}d(x_n,y_n)=\lim\limits_{k\to\infty}d(x_{n_k},y_{n_k})=d\left(\lim\limits_{k\to\infty}x_{n_k},\lim\limits_{k\to\infty}y_{n_k}\right)=d(a_1,a_2)
$$