This problem has been distracting me for quite some time. I have found some values for x with different values of a and b using brute force, but could not find any patterns in the results. I was wondering if there was a better way to solve for x.
Here is one solution I found: if $x = 2.446481944$ (approx.) then $4^x + 5^x = (4 + 5)^2 = 81$
As Robert Israel commented, there is no explicit solution for $x$ except in a few cases such as $a=b^n$ $(n=0,1,2,3,4)$ where the problem reduces to polynomials.
So, for the most general case, you need some numerical method and the simplest is probably Newton considering that we look for the zero of equation $$f(x)=a^x+b^x-(a+b)^2=e^{x\log(a)}+e^{x\log(b)}-(a+b)^2$$ Without loss of generality, let us assume $a>b$ and rewrite $$e^{x\log(a)}=(a+b)^2-e^{x\log(b)}$$ and search for the zero of equation $$g(x)={x\log(a)}-\log\left((a+b)^2-e^{x\log(b)} \right)$$ which is better conditioned. You can start iterating using $$x_0=2\frac{\log(a+b)} {\log(a)}$$ Using your numbers $a=5$ and $b=4$, Newton method will generate the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & 2.730424778 \\ 1 & 2.489833783 \\ 2 & 2.447205870 \\ 3 & 2.446482135 \\ 4 & 2.446481944 \end{array} \right)$$ which is the solution for ten significant figures.
If you plot function $g(x)$, you will notice that it is almost a straight line; this explains why the convergence is so fast.