<s>[INST] Finding all positive integers $x,y,z$ that satisfy $3^x - 5^y = z^2$ 
Find all positive integers $x,y,z$ that satisfy:
$$3^x - 5^y = z^2.$$

I think that $(x,y,z)= (2,1,2)$ will be the only solution. But how to prove that?
 [/INST] Notice that:
$$\begin{align}3^x - 5^y &\equiv (-1)^{x} - 1 \mod 4\\
z^2 &\equiv  (-1)^x - 1 \mod{4}\\
&\equiv \begin{cases} 0 & \text{$x$ even,}\\ 2 & \text{$x$ odd}\end{cases} \end{align}$$
Since $2$ is a quadratic non-residue modulo $4$, $x$ must be even $\implies x = 2a$ for positive integer $a$. Furthermore, $4| z^2 \implies 2|z \implies z = 2b$ for positive integer b.
Hence, we get:
$$\begin{align}3^{2a} - 5^y &= (2b)^2\\
5^y &= 3^{2a} - (2b)^2\\
5^y &= (3^a + 2b)(3^a - 2b)\end{align}$$ 
If $(3^a - 2b) > 1$, we notice that :
$$\begin{align}
&a,b > 0, a \in \mathbb{Z}\\
\implies &3^a + 2b > 3^a - 2b \ge 1\\
\implies &3^a + 2b > 1\end{align}$$
But $3^a + 2b$ is a perfect power of 5, implying that $5|(3^a + 2b)$. Hence, we have :
$$\begin{align}
3^a + 2b &\equiv 0 \mod 5\\
3^a - 2b &\equiv -4b \mod 5\\
3^a - 2b &\equiv b \mod 5\end{align}$$
If $(3^a - 2b)$ is a perfect power of $5$ (excluding 1), then from above, we get $b = 5k$ for positive integer $k$. But if $b = 5k$, then:
$$\begin{align}3^a + 2b &= 3^a + 10k\\
&\equiv 3^a \mod {5}\\
&\not\equiv 0 \mod{5}\end{align}$$
Hence, $(3^a - 2b)$ cannot be greater than $1$ $\implies 3^{\frac{x}{2}} - z = 1 \implies 3^x = (1 + z)^2$, which has infinitely many solutions, one of which is $x = 2, z = 2 \implies y = 1$. Now, we just have to find a way to show that there are no other solutions.
</s>