Dec 16, 2022
I found another solution that uses the same trick at the end.
Using the first given equation, we can see that
3^(x - y) = 10*3^(-y) - 1
3^(y - x) = 10*3^(-x) - 1
Then we must have
3^(x - y) + 3^(y - x) = 10*(3^(-y) + 3^(-x)) - 2 = 10 * ((3^y + 3^x)/3^{x + y}) - 2. Plug the first and second given equations into here to get the same final answer of 18.