How to get the maximum value of the sum in two sides in two right triangles? The problem is as follows:

The figure from below shows two triangles intersected on point $E$. Assume $AE=3\,m$ and $ED=1\,m$. Find the maximum value of $AB+EC$


The given choices in my book are as follows:
$\begin{array}{ll}
1.&\sqrt{10}\,m\\
2.&\4\,m\\
3.&\sqrt{5}\,m\\
4.&\4\,m\\
\end{array}$
The official solution for this problem according to my book is shown below:
Let $M=AB+EC$
Notice on the figure:

$AB=3\sin x$
and $EC=\cos x$
$M=3\sin x+\cos x$
$M=\sqrt{10}\left(\frac{3}{\sqrt{10}}\sin x+\frac{1}{\sqrt{10}}\cos x\right)$
$\tan \alpha =\frac{1}{3}$
$M=\sqrt{10}\left(\sin (x+\alpha)\right)$
Also notice that $x$ and $\alpha$ are acute angles.
Therefore:
$0<x+\alpha<\pi$
$\sin (x+\alpha)\leq 1$
Thus the maximum $M$ is $\sqrt{10}$.
There is where it ends the official solution.
But I am confused, where exactly is that alpha that is being talking about?, how did the author came up with the idea of $\sqrt{10}$ and the use of $\frac{1}{3}$.
Could someone please explain me, the logic that the author used and offer an alternate solution, perhaps easier to understand and less to guess what it was meant?.
I appreciate a step by step solution so I can understand.

Let $AM=CD$ and $AN=DE$
Since $\angle AMN=\angle CDE$,(cyclic quadrilateral),  $\triangle AMN \cong \triangle DCE$, then, $AN=ED=1$
Let $AB=x$, and, $EC=MN=y$
Since $\triangle ABE \sim \triangle AMN$, (AAA Similarity), $BE=3y$
FIRST ALTERNATIVE SOLUTION:
$x^2+9y^2=9$, in $\triangle ABE$
$x=\sqrt{9-9y^2}$
To find max$(x+y)$
$f(y)=\sqrt{9-9y^2}+y$
$f'(y)=\frac{-9y}{\sqrt{9-9y^2}}+1=0$
There is a maximum when $y=\frac{1}{\sqrt{10}}$ ,and, $x=\frac{9}{\sqrt{10}}$
$\text{max}(AB+EC)=\text{max}(x+y)=\frac{10}{\sqrt{10}}=\sqrt{10}$
SECOND ALTERNATIVE SOLUTION:
$x^2+9y^2=9$, in $\triangle ABE$
To find max$(x+y)$
Applying Cauchy-Schwarz inequality
$$(x+y)^2=(x+\frac{1}{3}\times 3y)^2\leq (1^2+(\frac{1}{3})^2)\times (x^2+(3y)^2)=$$
$$=(1+\frac{1}{9})\times (x^2+9y^2)=$$
$$=(1+\frac{1}{9})\times 9=10$$
$$x+y\leq\sqrt{10}$$
