[proofplan]
Fix an arbitrary vertex $x \in V(G)$. The diameter hypothesis forces every other vertex to be reachable from $x$ in at most two steps, i.e., every vertex lies in $\{x\}$, in the open neighbourhood $N(x)$, or in the second neighbourhood $N(N(x)) \setminus (N(x) \cup \{x\})$. We bound each of these sets: $|N(x)| \leq \Delta(G)$, and each $z \in N(x)$ contributes at most $\Delta(G) - 1$ vertices to the second neighbourhood (discounting $x$, which is adjacent to $z$). Summing the three contributions gives $|G| \leq 1 + \Delta(G) + \Delta(G)(\Delta(G)-1) = \Delta(G)^2 + 1$.
[/proofplan]
[step:Partition $V(G)$ using the ball of radius $2$ around $x$]
Fix $x \in V(G)$ (non-empty since $|G| \geq 1$; the bound is trivial for $|G| = 1$). Define
\begin{align*}
N(x) &:= \{y \in V(G) : xy \in E(G)\}, \\
N^2(x) &:= \{y \in V(G) : d_G(x, y) = 2\},
\end{align*}
where $d_G$ denotes graph distance. Note that $x \notin N(x)$ (since $G$ has no loops) and $N(x) \cap N^2(x) = \varnothing$ (a vertex at distance $2$ is not adjacent to $x$).
Since $G$ is connected and $\operatorname{diam}(G) \leq 2$, every vertex $y \neq x$ satisfies $d_G(x, y) \in \{1, 2\}$, i.e., $y \in N(x) \cup N^2(x)$. Therefore
\begin{align*}
V(G) = \{x\} \sqcup N(x) \sqcup N^2(x),
\end{align*}
and
\begin{align*}
|G| = 1 + |N(x)| + |N^2(x)|.
\end{align*}
[/step]
[step:Bound $|N(x)|$ by $\Delta(G)$ using the maximum-degree hypothesis]
By definition of the maximum degree $\Delta(G) := \max_{v \in V(G)} \deg(v)$, we have $\deg(x) \leq \Delta(G)$. Since $|N(x)| = \deg(x)$,
\begin{align*}
|N(x)| \leq \Delta(G).
\end{align*}
[/step]
[step:Bound $|N^2(x)|$ by covering it with neighbourhoods of vertices in $N(x)$]
Every $y \in N^2(x)$ satisfies $d_G(x, y) = 2$, so there exists (at least one) vertex $z \in V(G)$ with $xz, zy \in E(G)$. Such $z$ is adjacent to $x$, hence $z \in N(x)$. Thus
\begin{align*}
N^2(x) \subseteq \bigcup_{z \in N(x)} N(z).
\end{align*}
For each $z \in N(x)$, the neighbourhood $N(z)$ contains $x$ (since $z \sim x$), so $N(z) \setminus \{x\}$ has size at most $\deg(z) - 1 \leq \Delta(G) - 1$. Moreover $N^2(x) \cap \{x\} = \varnothing$, so we may intersect with the complement of $\{x\}$ without losing any element of $N^2(x)$:
\begin{align*}
N^2(x) \subseteq \bigcup_{z \in N(x)} \left(N(z) \setminus \{x\}\right).
\end{align*}
Applying the union bound on cardinality,
\begin{align*}
|N^2(x)| \leq \sum_{z \in N(x)} |N(z) \setminus \{x\}| \leq \sum_{z \in N(x)} (\Delta(G) - 1) = |N(x)| \cdot (\Delta(G) - 1) \leq \Delta(G)(\Delta(G) - 1).
\end{align*}
[guided]
We want to count vertices at distance exactly $2$ from $x$. For each such vertex $y$, there is a path $x - z - y$ of length $2$; the intermediate vertex $z$ is a neighbour of $x$, i.e., $z \in N(x)$. Hence every vertex at distance $2$ lies in the neighbourhood of *some* vertex in $N(x)$:
\begin{align*}
N^2(x) \subseteq \bigcup_{z \in N(x)} N(z).
\end{align*}
This is the key geometric observation.
Two refinements tighten the bound:
(1) Each $z \in N(x)$ has $x$ as a neighbour (since $z \sim x$). But $x \notin N^2(x)$, so when counting contributions to $N^2(x)$, we should exclude $x$ from $N(z)$:
\begin{align*}
|N(z) \setminus \{x\}| \leq \deg(z) - 1 \leq \Delta(G) - 1.
\end{align*}
(2) The union might overcount — different $z, z' \in N(x)$ could share a common neighbour $y$ in $N^2(x)$. But the union bound is valid regardless: $|N^2(x)| \leq \sum_{z \in N(x)} |N(z) \setminus \{x\}|$.
Combining:
\begin{align*}
|N^2(x)| \leq \sum_{z \in N(x)} (\Delta(G) - 1) = |N(x)|(\Delta(G) - 1) \leq \Delta(G)(\Delta(G)-1).
\end{align*}
Why is the $-1$ important? Without it, the bound would be $\Delta(G)^2$, giving $|G| \leq \Delta(G)^2 + \Delta(G) + 1$ — off by $\Delta(G)$ from the Moore bound. Excluding the "back-edge" to $x$ is what sharpens the count.
[/guided]
[/step]
[step:Sum the contributions to obtain the Moore bound]
Combining the bounds from the previous steps,
\begin{align*}
|G| = 1 + |N(x)| + |N^2(x)| \leq 1 + \Delta(G) + \Delta(G)(\Delta(G) - 1).
\end{align*}
Expanding:
\begin{align*}
1 + \Delta(G) + \Delta(G)(\Delta(G) - 1) = 1 + \Delta(G) + \Delta(G)^2 - \Delta(G) = \Delta(G)^2 + 1.
\end{align*}
This is the asserted bound.
[/step]