Suppose $S$ is a hyperbolic surface with geodesic boundary and $P$ is a hyperbolic pair of pants with $a$, $b$, $c$ geodesic boundary. Let $\gamma$ be the unique geodesic realizing the distance between the boundary components $b$ and $c$ of the pair of pants $P$, i.e. $\operatorname{length}(\gamma) = \operatorname{dist}(b, c)$. Now suppose $d$ is a boundary of $S$ such that the length of $d$ is equal to the length of $a$. We attach $P$ with $S$ along the boundary components $a$ and $d$ so that the resulting surface $S'$ is a hyperbolic surface. Now my questionis the following:
Does the geodesic $\gamma$ realise the distance between $a$ and $b$ in the surface $S'$?