We consider the picture:

and want to show the following relation (Stewart) by using the point $E$ as an intermediate point.
$$
AB^2\cdot m + AC^2\cdot n = BD^2\cdot m + CD^2\cdot n + AD^2\cdot (m+n)\ .
$$
Here, $n=BD$, $m=DC$, and we will use the notations $x=BE$, $y=EC$, $h=AE$, $s=AD$, and the usual notations $a=BC=m+n=x+y$, $b=CA$, $c=AB$. Then we have:
$$
\begin{aligned}
&c^2 = \color{red}{h^2}+x^2\ ,\\
&b^2 = \color{red}{h^2}+y^2\ ,\\
&s^2 %= \color{red}{h^2}+(y-m)^2\\
= \color{red}{h^2}+(x-n)^2\ ,\\
&AB^2\cdot m + AC^2\cdot n -
AD^2\cdot (m+n)\\
&\qquad=c^2m +b^2n -s^2(m+n)\\
&\qquad=(\color{red}{h^2}+x^2)m
+(\color{red}{h^2}+y^2)n
-(\color{red}{h^2}+(x-n)^2)(m+n)\\
&\qquad=x^2m+y^2n-(x-n)^2(m+n)\\
&\qquad=x^2(a-n)+(a-x)^2n-(x-n)^2a\\
&\qquad=(x^2a-x^2n)+(a^2n-2axn+x^2n)-(x^2a-2axn+n^2a)\\
&\qquad=a^2n-n^2a=an(a-n)=amn=(m+n)mn=m^2n+n^2m\\
&\qquad=BD^2\cdot m + DC^2n\ .
\end{aligned}
$$
$\square$
Later EDIT:
The above is for me the simpler way to display and remember the calculus, but ok, it is easy to rewrite it as wanted in the comments. If this helps...
$$
\begin{aligned}
&c^2 = \color{red}{h^2}+x^2\ ,\\
&b^2 = \color{red}{h^2}+y^2\ ,\\
&s^2 %= \color{red}{h^2}+(y-m)^2\\
= \color{red}{h^2}+(x-n)^2\ ,\\[3mm]
&AB^2\cdot m + AC^2\cdot n \\
&\qquad=c^2m +b^2n \\
&\qquad=(\color{red}{h^2}+x^2)m
+(\color{red}{h^2}+y^2)n\ ,
\\[3mm]
&AD^2\cdot (m+n)\\
&\qquad=s^2(m+n)\\
&\qquad=(\color{red}{h^2}+DE^2)(m+n)\\
&\qquad=(\color{red}{h^2}+(x-n)(m-y))(m+n)\\[3mm]
&BD^2\cdot m + DC^2n+AD^2\cdot (m+n)\\
&\qquad=n^2m + m^2n + (\color{red}{h^2}+(x-n)(m-y))(m+n)\\
&\qquad=\color{red}{h^2}(m+n)
+mn(m+n)+(xm+yn-mn-xy)(m+n)\\
&\qquad=\color{red}{h^2}(m+n)+(xm+yn-xy)(m+n)\\
&\qquad=\color{red}{h^2}(m+n)+(xm+yn-xy)(x+y)\\
&\qquad=\color{red}{h^2}(m+n)+(x^2m+y^2n)
\\
&\qquad\qquad+\underbrace{(xym+xyn-x^y-xy^2)}_{=xy(m+n-x-y)=xy(a-a)=0}\\
&\qquad=\color{red}{h^2}(m+n)+(x^2m+y^2n)
\\
&\qquad=(\color{red}{h^2}+x^2)m+(\color{red}{h^2}+y^2)n\\
&\qquad=c^2m+b^2n\\
&\qquad=AB^2\cdot m+AC^2\cdot n
\ .
\end{aligned}
$$
$\square$