Let $(M_1, g_1)$ and $(M_2, g_2)$ be two complete Riemannian manifolds and consider the product $(M, g) = (M_1 \times M_2, g_1 + g_2)$.
Let $\gamma : \mathbb{R} \to (M,g )$ be a line. I can write $t \mapsto \gamma(t) = ( \gamma_1(t), \gamma_2(t))$, where $\gamma_1(t) \in M_1$ and $\gamma_2(t) \in M_2$.
I know that if $\gamma$ is a geodesic then also $\gamma_1$ and $\gamma_2$ are geodesics in $(M_1, g_1)$ and $(M_2, g_2)$ respectively.
My question is
If $\gamma$ is a line, how can I prove that $\gamma_1$ and $\gamma_2$ are lines (assuming that they are not constant and up to a scaling factor)?
Thanks!
EDIT: Let $(N, g_N)$ be a Riemannian manifold. A geodesic $l : \mathbb{R} \to (N, g_N)$ is said to be a line if $$ dist\big(l(s), l(t)\big) = |t-s| $$ for every $t, s \in \mathbb{R}$.
If $c(t)=(c_1,c_2)(t),\ t\in [0,1]$ is a curve in the product manifold then we have that $c$ is geodesic iff $c_1,\ c_2$ are geodesic
And we have length $$ L(c)=\int_0^1 \sqrt{ |c_1'(t)|_{g_1}^2+ |c_2'(t)|_{g_2}^2 }\ dt $$
For $(p_1,q_1), \ (p_2,q_2)$ there exists a shortest geodesic $c :[0,1]\rightarrow M_1\times M_2 $ by $c(t)=(c_1,c_2)(t)$ Then $$ d((p_1,q_1), (p_2,q_2))=L(c)= \int_0^1 \sqrt{ |c_1'(t)|_{g_1}^2+ |c_2'(t)|_{g_2}^2 }\ dt =\sqrt{ |c_1'(0)|_{g_1}^2 + |c_2'(0)|_{g_2}^2}$$
If $c_1$ is not a shortest geodesic from $p_1$ to $p_2$, then there exists a shortest geodesic $a$ s.t. $$ a: [0,1]\rightarrow M_1,\ |a'(0)|_{g_1} < |c_1'(0)|_{g_1} $$
This implies that $c$ is not shortest.