<s>[INST] Solve in positive integers: $5^x 7^y +4=3^z$ Solve in positive integers: $5^x 7^y +4=3^z$.
I tried to solve it with log but I couldn't complete.
 [/INST] Rewrite this as

$$3^z-4=5^x7^y$$

Then we see, because $x>0$, that
$$3^z-4\equiv 0\mod 5 \iff 3^z\equiv -1\mod 5$$
so $z=2j$ is even. 
Then we have $(3^j-2)(3^j+2)=5^x7^y$. Since the gcd of these two divides $4$--because $(3^j-2)+(3^j+2)=4$--we have that they are coprime (any larger factor would then be a factor of $5^x7^y$ which is odd), i.e. one of the following two cases hold

$$\begin{cases} 3^j+2=5^x\quad ,\quad 3^j-2=7^y \\ 3^j+2=7^y\quad ,\quad3^j-2=5^x\end{cases}.$$

In the second case we get $7^y\equiv 2\mod 3$ which is impossible, so we are in case $1$. Then $3^j=7^y+2$ so $j\equiv 2\mod 6$ which recovers our original conclusion, that $z=12\ell+4\equiv 0\mod 4$, which is a contradiction as this implies

$$-3\equiv 3^z-4\equiv 5^x7^y\equiv 0\mod 5.$$

</s>