Two parabolas are given in parametric form
$r_1 = r_{01} + v_1 \ t_1 + v_2 \ t_1^2 $
$r_2 = r_{02} + w_1 \ t_2 + w_2 \ t_2^2 $
where $r_{01}, v_1, v_2, r_{02}, w_1, w_2 \in \mathbb{R}^3$
It is required to find $t_1$ and $t_2$ that will result in $r_1$ and $r_2$ being as close as possible.
My attempt
The squared distance function is
$ f = (r_1 - r_2) \cdot (r_1 - r_2) $
Differentiating with respect to $t_1$ and $t_2$, and setting them to $0$, gives the following two equations
$ (r_1 - r_2) \cdot (v_1 + 2 t_1 v_2 ) = 0 $
$ (r_1 - r_2) \cdot (w_1 + 2 t_2 w_2) = 0 $
These two equations involve $t_1, \ t_1^2, \ t_2, \ t_2^2, \ t_1^2 t_2 , \ t_1 t_2^2, \ t_1^3, \ t_2^3 $
So probably the best way to solve them for $t_1$ and $t_2$ is numerically, through the Newton-Raphson method. That is exactly what I did, and I got the solution in $5$ iterations which is typical for nonlinear systems of equations with $2$ variables.
The code I used is listed in my solution below.
Any comments, hints, or alternative solutions are welcome and highly appreciated.
Below is the code that I used to implement the Newton-Raphson iteration. It is written in Microsoft Excel VBA (Visual Basic for Applications) script.