How many answers to $|3^x-2^y|=5$?

There are only a finite number of solutions. It was proved by Pillai that $a^x - b^y = k$ where $a,b,k$ are fixed positive integers, $a > 1, b > 1, k \neq 0,$ with positive integer variables $x,y,$ has finitely many solutions. This is from page 51 in Shorey and Tijdeman, Exponential Diophantine Equations. The two papers by Pillai are 1931 and 1936. Both are in the Journal of the Indian Mathematical Society. A detail: if $k$ is larger than some bound that depends on $a,b,$ there is only one solution. Since we have more than one solution for $k = -5,$ it appears Pillai's bound is not tight enough to finish this problem. We just know one solution for $k=5.$


Here's an elementary self-contained argument that there is no solution with $y>5$.

A power of $3$ is congruent to either $1$ or $3 \bmod 8$, so once $y \geq 3$ we must have $3^x - 2^y = -5$.

Once $y \geq 6$, we then have $3^x \equiv -5 \bmod 2^6$, and thus $x \equiv 11 \bmod 16$.

But then $3^x + 5 \equiv 12 \bmod 17$, and no power of $2$ is congruent to $12 \bmod 17$ (the powers of $2 \bmod 17$ are $2,4,8,-1,-2,-4,-8,1,2,4,8,-1$ etc.), QED.