Given $p = (x,y,z)'$ eliminating $t$ in the equation
$$
p = v_0+v_1\cos t+v_2\sin t
$$
with the given values
$$
\cases{
v_0 = (2,3,7)'\\ v_1 = (1,0.5,0.5)'\\ v_2 = (-2,6,2)\\
p_A = (5,10,2)'\\ p_B=(1,-5,6)'}
$$
we obtain equivalently
$$
\cases{
3 y + 36 + 2 x - 7 z = 0\\
28 x z + 20 z^2 - 336z + 1404 - 264 x + 17 x^2=0
}
$$
Note that $3 y + 36 + 2 x - 7 z = 0$ is the plane containing the ellipse. Now eliminating $z$ we arrive at
$$
92 x y - 304y + 20 y^2 + 1116 - 856 x + 145 x^2 = 0
$$
this is the ellipse equation referred to it's plane.
Now eliminating $z$ in
$$
\cases{
d = \|p-p_A\|+\|p-p_B\|\\
3 y + 36 + 2 x - 7 z = 0}
$$
we obtain the distance $d$ as a function of points pertaining to the ellipse plane or
$$
573049 - 15838 d^2 + 49 d^4 - 60560 x + 1048 d^2 x + 1600 x^2 -
212 d^2 x^2 - 281604 y + 788 d^2 y + 14880 x y - 48 d^2 x y +
34596 y^2 - 232 d^2 y^2 = 0
$$
now at minimum/maximum the two curves
$$
\cases{
92 x y - 304y + 20 y^2 + 1116 - 856 x + 145 x^2 = 0\\
573049 - 15838 d^2 + 49 d^4 - 60560 x + 1048 d^2 x + 1600 x^2 -
212 d^2 x^2 - 281604 y + 788 d^2 y + 14880 x y - 48 d^2 x y +
34596 y^2 - 232 d^2 y^2 = 0
}
$$
are tangent. Now eliminating $y$ between then, we arrive at a polynomial which contains a double root at the tangency point so,
$$
P_d(x)=k_0(x-x_t)^2(x^2 + c_1 x + c_0)\ \ \ \forall \{x,d\}
$$
or equivalently
$\alpha_i(d) = 0,\ \ \{i = 0,\dots,4\}$ in $P_d(x)-k_0(x-x_t)^2(x^2 + c_1 x + c_0)=\sum_{i=0}^4 \alpha_i(d)x^i$
Finally, using Groebner bases we can eliminate $\{k_0,c_1,c_0,x_t\}$ from the polynomial system $\alpha_i(d) = 0$ thus obtaining a polynomial in $d$ which contains our solutions.
Follows a MATHEMATICA script showing this process.
v0 = {2, 3, 7};
v1 = {1, 0.5, 0.5};
v2 = {-2, 6, 2};
pA = {5, 10, 2};
pB = {1, -5, 6};
p = {x, y, z};
equs = p - (v0 + v1 Cos[t] + v2 Sin[t]);
equsxy = Quiet@Eliminate[equs == 0, t];
planeE = equsxy[[1]];
ellxy = Quiet@Eliminate[equs == 0, {t, z}];
distxy = Quiet@Eliminate[{Sqrt[(p - pA) . (p - pA)] + Sqrt[(p - pB) . (p - pB)] - d == 0, planeE}, z];
equ0 = First[Eliminate[{ellxy, distxy}, y]] - k0 (x - xt)^2(x^2 + c1 x + c0);
coefk0 = Solve[D[equ0, x, x, x, x]/4! == 0, k0][[1]];
equ00 = equ0 /. coefk0;
rels = CoefficientList[equ00, x];
vars = Variables[rels]
Length[rels]
pold = Eliminate[rels == 0, {c0, c1, xt}];
dist = Solve[pold, d, Reals] // N
thus obtaining
$$
\cases{
d_{min}= 16.083482892850036\\
d_{max}= 23.018111746188083
}
$$