We have $b^a-a^b=1$. It is clear that $b \neq 1$. If $a=1$, then $b-1=1 \implies b=2$. Thus, we get our first solution $(a,b)=(1,2)$. Now, we can take $a,b>1$. As $b^a-a^b=1$, both $a$ and $b$ cannot be odd. Thus, one of them is definitely even and the other will be odd.
If $b$ is even, we will have $b^a=a^b+1$. The LHS is an even number raised to a power greater than $1$, and thus has to be $0 \bmod 4$. The RHS is the sum of two odd squares and thus has to be $2 \bmod 4$. This is clearly a contradiction. Thus, we have $a$ to be even and $b$ to be odd.
Now, consider a prime $p \mid (a+1)$. By Lifting the Exponent Lemma, we have:
$$\nu_p(a^b+1)=\nu_p(a+1)+\nu_p(b)$$
where $\nu_p(x)$ is the power of $p$ dividing $x$. We also clealy have:
$$\nu_p(a^b+1)=\nu_p(b^a)=a\nu_p(b) \implies \nu_p(a+1)+\nu_p(b)=a\nu_p(b)$$
$$\nu_p(a+1)+\nu_p(b)=a\nu_p(b) \implies \nu_p(a+1)=(a-1)\nu_p(b) \geqslant a-1$$
Here, we definitely have $\nu_p(b) \geqslant 1$ as $p \mid (a+1) \implies p \mid b$. Now, since the power of $p$ dividing $a+1$ is atleast $a-1$, we have $a+1 \geqslant p^{a-1} \geqslant 3^{a-1}$. It is quite clear that only $a=2$ can satisfy this.
Now, $b^2-2^b=1$. If $b>3$ we will have $b^2<2^b$. Thus, we get $(a,b)=(2,3)$ as the only other solution. Thus, the two solutions are:
$$(a,b)=(1,2),(2,3)$$