If the point $D$ divides the base $BC$ of a $\triangle ABC$ in the ratio $n : m$, prove that
$m \cdot \left(AB\right)^2 + n \cdot \left(AC\right)^2 = \left(m + n\right) \left(AD\right)^2 + m \cdot \left(BD\right)^2 + n \cdot \left(DC\right)^2$
Let $B$ be at the origin. Then the coordinates of point $B = \left(0,0\right)$
Let $BC$ be along the $X$ axis and the line perpendicular to $BC$ be the $Y$ axis.
Let $BC = a$. $\;$ Then $\;$ $C = \left(a, 0\right)$
Let $\;$ $a = \left(x, y\right)$
Since point $D$ divides the base $BC$, point $D$ is also on the $X$ axis.
Let $\;$ $D = \left(p, 0\right)$
The point $D$ divides $BC$ in the ratio $n : m$
$\therefore \;$ By section formula for internal division, the $x$ coordinate of point $D$ is
$p = \dfrac{n \times a + m \times 0}{m + n} = \dfrac{na}{m + n}$
$\therefore \;$ $D = \left(\dfrac{na}{m + n}, 0\right)$
Now, by distance formula,
$\left(AB\right)^2 = \left(x - 0\right)^2 + \left(y - 0\right)^ = x^2 + y^2$
$\left(AC\right)^2 = \left(x - a\right)^2 + \left(y - 0\right)^2 = x^2 + a^2 - 2ax + y^2$
$\left(AD\right)^2 = \left(x - \dfrac{na}{m + n}\right)^2 + \left(y - 0\right)^2 = x^2 + \dfrac{a^2 n^2}{\left(m + n\right)^2} - \dfrac{2xna}{m + n} + y^2$
$\left(BD\right)^2 = \left(0 - \dfrac{na}{m + n}\right)^2 + 0^2 = \dfrac{a^2 n^2}{\left(m + n\right)^2}$
$\left(DC\right)^2 = \left(a - \dfrac{na}{m + n}\right)^2 + 0^2 = \left(\dfrac{am + an - an}{m + n}\right)^2 = \dfrac{a^2 m^2}{\left(m + n\right)^2}$
Now,
$\begin{aligned}
LHS & = m \cdot \left(AB\right)^2 + n \cdot \left(AC\right)^2 \\\\
& = m \left(x^2 + y^2\right) = n \left(x^2 + a^2 - 2ax + y^2\right) \\\\
& = x^2 \left(m + n\right) + y^2 \left(m + n\right) + a^2 n - 2anx \\\\
& = \left(m + n\right) \left(x^2 + y^2\right) + an \left(a - 2x\right) \;\;\; \cdots \; (1)
\end{aligned}$
$\begin{aligned}
RHS & = \left(m + n\right) \left(AD\right)^2 + m \cdot \left(BD\right)^2 + n \cdot \left(DC\right)^2 \\\\
& = \left(m + n\right) \left[x^2 + \dfrac{a^2 n^2}{\left(m + n\right)^2} - \dfrac{2xna}{m + n} + y^2\right] + m \times \dfrac{a^2 n^2}{\left(m + n\right)^2} + n \times \dfrac{a^2 m^2}{\left(m + n\right)^2} \\\\
& = \left(m + n\right) x^2 + \left(m + n\right) y^2 + \dfrac{a^2 n^2}{m + n} - 2xna + \dfrac{a^2}{\left(m + n\right)^2} \left(mn^2 + nm^2\right) \\\\
& = \left(m + n\right) \left(x^2 + y^2\right) + \dfrac{a^2 n^2}{m + n} - 2xna + \dfrac{a^2 mn}{\left(m + n\right)^2} \left(n + m\right) \\\\
& = \left(m + n\right) \left(x^2 + y^2\right) - 2xna + \dfrac{a^2 n^2}{m + n} + \dfrac{a^2 mn}{m + n} \\\\
& = \left(m + n\right) \left(x^2 + y^2\right) - 2xna + a^2 n \left(\dfrac{n}{n + m} + \dfrac{m}{m + n}\right) \\\\
& = \left(m + n\right) \left(x^2 + y^2\right) - 2xna + a^2 n \\\\
& = \left(m + n\right) \left(x^2 + y^2\right) + an \left(a - 2x\right) \;\;\; \cdots \; (2)
\end{aligned}$
$\therefore \;$ From equations $(1)$ and $(2)$ we have $LHS = RHS$.
Hence proved.