Write $x_n=22..244...45$ as sum of $2$ squares I've recently came across this problem and, although I've spent time looking for a solution, I don't have any interesting ideas.

Let the numbers 
  $$x_1=25$$
  $$x_2=2245$$
  $$x_3=222445$$
  and $x_n=22..244...45$ with $n$ digits $'2'$ and $n-1$ digits $'4'$
Prove that $x_n$ can be written  as a sum of two perfect squares for any natural number $n\ge1$.

The first impulse was to decompose the number:
$$ x_n = 2 \times \left(10^{2n-1}+\dots+10^n\right) + 4 \times \left(10^{n-1}+\dots+10\right)+ 5$$
$$ x_n = 2 \times \frac{10^{2n}-10}{9} + 2 \times \frac{10^{n}-10}{9} + 5$$
$$ x_n = \frac{20}{9} \left(10^{2n-1} - 1 + 10^{n-1} - 1\right) + 5$$
Anyway, this doesn't seem to lead to the good track. A piece of advice or a hint would be apreciated.
P.S. I guess that it's because of the Stack Exchange android app, but although I wrote something on the first line ("Hi there"), this doesn't appear in the post. This happened several times.

\begin{align*}
  x_{n} &= \left( \frac{10^{n}+a}{3} \right)^{2}+
           \left( \frac{10^{n}+b}{3} \right)^{2} \\
        &= \frac{2(10^{2n})+2(a+b)10^{n}+a^{2}+b^{2}}{9}
\end{align*}
Solving
$$\left \{ \begin{array}{ccc} a+b &=& 1 \\
  a^{2}+b^{2} &=& 5 \end{array}
 \right.$$
$$(a,b)=(2,-1),(-1,2)$$
