What you've done is mostly correct, but your proof of $\gcd(a,5)=\gcd(b,5)=1$ has a significant problem. In particular, with your result of $a_1^2+b_2=5^{x-2}$, you then wrote
Again $x=2$ is impossible. So $a_1=5a_2...$
However, you haven't proven, or even indicated, why we require $a_1=5a_2$ (e.g., since there's no indication or requirement that $5 \mid b_2$). Nonetheless, your claim is correct, with also using the other equation being one way to prove it. Starting as you did to first get
$$5a_1^2 + b_1 = 5^{x-1} \tag{1}\label{eq1A}$$
we can then use that same substitution of $a = 5a_1$ and $b = 5b_1$ in the second equation to obtain
$$a_1 + 5b_1^2 = 5^{y-1} \tag{2}\label{eq2A}$$
Next, as you did, we have $x \gt 1$ and $y \gt 1$, so \eqref{eq1A} shows $b_1 = 5b_2$ and \eqref{eq2A} shows $a_1 = 5a_2$. Using these in both equations and simplifying again gives
$$25a_2^2 + b_2 = 5^{x-2}, \; \; \; a_2 + 25b_2^2 = 5^{y-2} \tag{3}\label{eq3A}$$
This procedure can keep being repeated (actually, we could use that $25$ divides $a_2$ and $b_2$, with higher powers of $5$ later, but it's sufficient, as well as simpler & easier, to just use one factor of $5$ each time). After doing that $j$ times, we end up with
$$5^{j}a_j^2 + b_j = 5^{x-j}, \; \; \; a_j + 5^{j}b_j^2 = 5^{y-j} \tag{4}\label{eq4A}$$
which is clearly impossible for large enough $j$ (i.e., since $x \ge y$, once $j = \left\lceil\frac{y}{2}\right\rceil$).
As for potential improvements in the presentation of your proof, the only ones I suggest are with
$ord_5b\mid 6$ but $ord_5b \mid 4$ so $ord_5b=2$ or $1$
First, instead of ord_5b
which becomes $ord_5b$, so the first part looks like the product of $3$ variables, I recommend using \operatorname{ord}_5b
instead, with this becoming $\operatorname{ord}_5b$, and it also automatically adds some horizontal space before the $b$ (with this, to me at least, making it look a bit better). Second, you may wish to explain that the first two parts together means that $\operatorname{ord}_{5}b \mid (\gcd(6,4) = 2)$, so that's why $\operatorname{ord}_{5}b$ must be either $2$ or $1$.
Finally, regarding any possibly better methods to use, with your claim that $5 \mid b + 1$, rather than using the multiplicative order, instead as Ross Millikan's answer indicates, use that $5 \nmid a$ so $a^2 \equiv 1 \text { or } 4 \pmod{5}$. Thus, from $a^2 + b \equiv 0 \pmod{5}$, we have $b \equiv 1 \text { or } 4 \pmod{5}$. If $b \equiv 1 \pmod{5}$ then, from $a + b^2 \equiv 0 \pmod{5}$, we have $a \equiv 4 \pmod{5}$. However, then $a^2 + b \equiv 1 + 1 \equiv 2 \pmod{5}$, so $b \not\equiv 1 \pmod{5}$. This means $b \equiv 4 \pmod{5}$ (and also $a \equiv 4 \pmod{5})$.
Second, note that $b^3 + 1 = (b + 1)(b^2 - b + 1)$. With $b \equiv 4 \pmod{5}$, we have $b^2 - b + 1 \equiv 1 - 4 + 1 \equiv 3 \pmod{5}$, so $\nu_5(b^3 + 1) = \nu_5(b + 1)$. This is basically what the lifting-the-exponent (LTE) lemma uses itself but, for something as relatively simple as in this case, it may be preferable to more directly prove it instead as I've explained.
Best Answer
If $p = 2$, then $n^2 + 1 \geq 2^n + 1$ is required (since $2^n + 1 \mid n^2 + 1$ and both sides are positive), which implies $n \leq 4$, which we can see only gives solutions $(p, n) = (2, 2), (2, 4)$.
Now if $p \neq 2$, then $p$ is an odd prime, and so $n$ must be odd since $p^n + 1$ is even. Note that $n \geq 3$ since $n \neq 1$, and so we have $p^n + 1 \mid n^p + 1 \implies p^{\frac{1}{p}} \leq n^{\frac{1}{n}}$. But $x^{\frac{1}{x}}$ is decreasing for $x \geq e$, so we must have $n \leq p$.
Now we note $p + 1 \mid p^n + 1 \mid n^p + 1$, so $n^p \equiv -1 \pmod{p+1}.$ Since $p$ is odd, this means $(-n)^p\equiv 1\pmod{p+1}.$
Euler's theorem tells us that $(-n)^{\phi(p+1)} \equiv 1 \pmod{p+1}$, and so by the $\gcd$ trick we get $(-n )^{\gcd(p, \phi(p+1))} \equiv 1 \pmod{p+1}$.
But we note that $2\mid p + 1$ so $\phi(p+1) \leq \frac{p+1}{2}$, so $p$ cannot be a factor of it. Therefore, $\gcd(p, \phi(p+1)) = 1$, and so $-n\equiv 1 \pmod{p+1}$. We conclude that $n \equiv -1 \pmod{p+1}$, and combining with $n \leq p$ yields $n = p$.