Triangle $ABC$: $A(1;4), B(7;8), C(9;2)$.
$BK is$ bisector of triangle.
What is the formula?
If you take two vectors of same length $\mathbf u$ and $\mathbf v$, $|u|=|v|$, then
$\mathbf u \pm \mathbf v$ will be vectors parallel to their internal and external bisecting lines.
And this is valid either in 2D and 3D.
Therefore we take the unitary vectors $$ \begin{gathered} \mathbf{a} = \frac{{\mathop {BA}\limits^ \to }} {{\left| {BA} \right|}} = - \,\frac{1} {{\sqrt {52} }}\left( {6,4} \right) = - \,\frac{1} {{\sqrt {13} }}\left( {3,2} \right) \hfill \\ \mathbf{c} = \frac{{\mathop {BC}\limits^ \to }} {{\left| {BC} \right|}} = \frac{1} {{\sqrt {40} }}\left( {2, - 6} \right) = \frac{1} {{\sqrt {10} }}\left( {1, - 3} \right) \hfill \\ \end{gathered} $$ and then taking a generic point $X(x,y)$, we impose that the vector ${\mathop {BX}\limits^ \to }$ be parallel to $\mathbf {a} + \mathbf {c}$.
You can do this by putting the (modulus of) cross product to $0$ $$ \mathop {BX}\limits^ \to = \left( {x - x_{\,B} ,y - y_{\,B} } \right)\quad :\quad \left| {\,\left( {\mathbf{a} + \mathbf{c}} \right) \times \mathop {BX}\limits^ \to \,} \right| = 0 $$
or by telling that the components be proportional $$ \mathop {BX}\limits^ \to = \left( {x - x_{\,B} ,y - y_{\,B} } \right)\quad :\quad \frac{{x - x_{\,B} }} {{\left( {a_{\,x} + c_{\,x} } \right)}} = \frac{{y - y_{\,B} }} {{\left( {a_{\,y} + c_{\,y} } \right)}} $$
The formula looks like it is related to the angle bisector theorem, which gives us that the angle bisector at $B$ divides the opposite side ($AC$) in proportion to the ratio of the other two sides.
My proof of the angle bisector theorem uses areas:
Given that $AD$ bisects $\angle CAB$. Consider the areas of $\triangle ABD$ and $\triangle ADC$, using $AB$ and $AC$ as the base. The altitude of $D$, $h$, is equal in the two cases - overlay the two triangles by folding over $AD$ to see this easily. Thus area $ABD = \frac h2 AB$ and area $ADC = \frac h2 AC$. Now consider the same triangles with base $CD$ and $DB$. The altitude of $A$, $g$, is equal in these cases giving area $ABD = \frac g2 DB$ and area $ADC = \frac g2 CD$. Thus: $$\frac h2 AB = \frac g2 DB \\ \frac h2 AC = \frac g2 CD \\ \frac gh = \fbox{$\frac{AB}{DB} = \frac{AC}{CD}$} $$