Problem: Find all triples $(a,b,p)$ of positive integers with $p$ prime and
\[ a^p=b!+p. \]

Solution: The answer is $(2,2,2)$ and $(3,4,3)$ only, which work.

In what follows we assume $a \ge 2$.

\begin{claim*}
  We have $b \le 2p-2$, and hence $a < p^2$.
\end{claim*}
\begin{proof}
  For the first half, assume first for contradiction that $b \ge 2p$.
  Then $b!+p \equiv p \pmod{p^2}$, so $\nu_p(b!+p)=1$,
  but $\nu_p(a^p)=1$ never occurs.

  We can also rule out $b = 2p-1$ since that would give
  \[ (2p-1)!+p = p \left[ (p-1)! (p+1)(p+2)\dots(2p-1) + 1 \right] \]
  By Wilson theorem the inner bracket is $(-1)^2+1 \equiv 2 \pmod p$
  exactly, contradiction for $p > 2$.
  And when $p=2$, $3!+2=8$ is not a perfect square.

  The second half follows as $a^p \le (2p-2)!+p < p^{2p}$.
  (Here we used the crude estimate
  $(2p-2)! = \prod_{k=1}^{p-1}k \cdot (2p-1-k) < (p(p-1))^{p-1}$).
\end{proof}

\begin{claim*}
  We have $a \ge p$, and hence $b \ge p$.
\end{claim*}
\begin{proof}
  For the first half, assume for contradiction that $p > a$.
  Then
  \[ b! + p = a^p \ge a^{p-1} + p \ge a^a + p > a! + p \implies b > a. \]
  Then taking modulo $a$ now gives $0 \equiv 0 + p \pmod{a}$,
  which is obviously impossible.

  The second half follows from $b! = a^p-p \ge p! - p > (p-1)!$.
\end{proof}

\begin{claim*}
  We have $a=p$ exactly.
\end{claim*}
\begin{proof}
  We know $p \ge b$ hence $p \mid b!+p$, so let $a = pk$ for $k < p$.
  Then $k \mid b!$ yet $k \nmid a^p-p$, contradiction.
\end{proof}

Let's get the small $p$ out of the way:
\begin{itemize}
  \ii For $p=2$, checking $2 \le b \le 3$ gives $(a,b)=(2,2)$ only.
  \ii For $p=3$, checking $3 \le b \le 5$ gives $(a,b)=(3,4)$ only.
\end{itemize}
Once $p \ge 5$, if $b! = p^p - p = p(p^{p-1}-1)$
then applying Zsigmondy gets a prime factor $q \equiv 1 \pmod{p-1}$
which divides $p^{p-1}-1$.
Yet $q \le b \le 2p-2$ and $q \neq p$, contradiction.