I will make this question specific at first, and general later.
Suppose we have two linked tori, $T_1$ and $T_2$,
each of radii $(2,1)$, meaning that each torus is the result of sweeping
a circle of radius 1 orthogonally around a circle of radius 2.
$T_2$ is rotated
$90^\circ$ with respect to $T_1$, so that they link snugly together:

They touch along two orthogonal circles of radius 1,
$C_1$ and $C_2$.
Let $T_i$ represent the surface of each torus.

Q1.What is the structure of a shortest path $\sigma(p_1,p_2)$ on $T_1 \cup T_2$ between two points, $p_1 \in T_1$ and $p_2 \in T_2$?

In general I believe $\sigma(p_1,p_2)$ follows a shortest path from $p_1$ on $T_1$ to a point $x_1$ on one of the circles, travels along an arc of that circle, perhaps switches at their junction to the second circle, follows an arc to $x_2$, and finally follows a shortest path on $T_2$ from $x_2$ to $p_2$. I am wondering whether or not some version of Snell's law applies here? Suppose the path from $p_1$ makes an angle $\alpha_1$ with one circle at $x_1$, and an angle $\alpha_2$ where it leaves from $x_2$ on that or the other circle on its way to $p_2$. Is it the case, with suitable conventions on the definitions of these angles, that $\alpha_1 = \alpha_2$?

Answer to Q1:Gjergji Zaimi showed my intuition (concerning following arcs of the circles $C_1$ and/or $C_2$) is wrong: "The shortest path [is] the one-point union of two geodesics.... [I]n particular you will have equal angles along the tangency circle.... This problem is about shortest paths on a single surface in disguise."

Q2.What is the general principle here, that would apply to several smooth surfaces contacting along one-dimensional curves?

Speculations, ideas, references—all welcomed. Thanks!

Answer to Q2:See Anton Petrunin's remarks on thegraded distance function$|x-y|_n$.