[proofplan]
We reduce the hinge comparison to the triangle form of Toponogov by closing the hinge with a minimizing geodesic between its endpoints. Toponogov's triangle angle comparison says that the model angle determined by the three actual side lengths is no larger than the given hinge angle $\alpha$. In the two-dimensional space form $M_k^2$, the opposite side length of a hinge with fixed adjacent sides $a,b$ is monotone nondecreasing in the included angle throughout the stated comparison range. Combining these two facts gives the desired inequality.
[/proofplan]
[step:Close the hinge by a minimizing side and define the actual opposite length]
Let $q_1 := \gamma_1(a)$ and $q_2 := \gamma_2(b)$ be the endpoints of the two given minimizing geodesic segments. Define the actual opposite side length $c \in [0,\infty)$ by
\begin{align*}
c := d_M(q_1,q_2).
\end{align*}
Since $(M,g)$ is complete, the Hopf-Rinow theorem gives a minimizing geodesic segment $\sigma:[0,c]\to M$ from $q_1$ to $q_2$ whenever $c>0$; if $c=0$, the desired inequality follows because the right-hand side is a distance and is therefore nonnegative. Hence assume $c>0$, and fix such a minimizing geodesic $\sigma$. The three minimizing segments $\gamma_1$, $\gamma_2$, and $\sigma$ form a geodesic triangle in $M$ with side lengths $a,b,c$ and included angle $\alpha$ at $p$.
[/step]
[step:Compare the actual angle with the model angle for the actual side lengths]
Let $\widetilde{\Delta}$ be the comparison triangle in the model surface $M_k^2$ with side lengths $a,b,c$, and let $\beta \in [0,\pi]$ denote the angle of $\widetilde{\Delta}$ between the sides of lengths $a$ and $b$. The triangle exists in the Toponogov comparison range: for $k\le 0$ this is the standard global range for $M_k^2$, while for $k>0$ the additional actual-side hypothesis gives $c<\pi/\sqrt{k}$ and $a+b+c<2\pi/\sqrt{k}$, which is precisely the spherical comparison range for the triangle with side lengths $a,b,c$. Applying the triangle form of Toponogov's Theorem to the geodesic triangle with vertices $p,q_1,q_2$ gives
\begin{align*}
\beta \le \alpha.
\end{align*}
Indeed, the hypotheses required for Toponogov are satisfied: $(M,g)$ is complete, $\sec_M\ge k$, the three sides of the triangle are minimizing geodesic segments by construction, and in the case $k>0$ the actual-side comparison range has just been verified from the hypotheses.
[guided]
The purpose of this step is to convert a statement about side lengths into a statement about angles in the model surface. We have an actual triangle with vertices $p,q_1,q_2$, adjacent side lengths $a,b$, opposite side length $c$, and actual included angle $\alpha$ at $p$. Let $\widetilde{\Delta}$ be the triangle in $M_k^2$ with the same three side lengths $a,b,c$, and let $\beta$ be the model angle between the sides of lengths $a$ and $b$.
We now apply the triangle form of Toponogov's Theorem. Its hypotheses are the comparison-geometry hypotheses available here, together with the spherical range condition when $k>0$. The manifold $(M,g)$ is complete, its sectional curvatures satisfy $\sec_M\ge k$, and each side of the triangle is minimizing: the sides from $p$ to $q_1$ and from $p$ to $q_2$ are minimizing by hypothesis, while the side from $q_1$ to $q_2$ is minimizing by the Hopf-Rinow construction in the previous step. If $k>0$, the actual-side hypothesis gives $c<\pi/\sqrt{k}$ and $a+b+c<2\pi/\sqrt{k}$, so the comparison triangle with side lengths $a,b,c$ is in the required spherical range. Therefore Toponogov's angle comparison applies and gives
\begin{align*}
\beta \le \alpha.
\end{align*}
This inequality says that, among triangles with the same three side lengths, the model triangle has no larger angle at the corresponding vertex than the actual triangle. The rest of the proof turns this angle inequality back into the desired side-length inequality by using the model law of cosines.
[/guided]
[/step]
[step:Use the model law of cosines to make the opposite side monotone in the included angle]
For fixed adjacent side lengths $a,b$, define the model opposite-side function $s:I\to [0,\infty)$ as follows. If $k\le 0$, set $I:=[0,\pi]$. If $k>0$, set $\lambda:=\sqrt{k}$ and let $I\subset[0,\pi]$ be the set of angles $\theta$ for which the hinge in $M_k^2$ with adjacent side lengths $a,b$ and included angle $\theta$ has a uniquely determined opposite side $s(\theta)<\pi/\lambda$ and perimeter $a+b+s(\theta)<2\pi/\lambda$. For every $\theta\in I$, let $s(\theta)$ denote that opposite side length. The hypotheses ensure that both $\alpha$ and $\beta$ lie in $I$ when $k>0$. We verify that $s$ is nondecreasing on this comparison interval.
If $k=0$, the Euclidean law of cosines gives
\begin{align*}
s(\theta)^2 = a^2+b^2-2ab\cos\theta,
\end{align*}
so $s(\theta)^2$ is nondecreasing in $\theta$ because $\cos\theta$ is nonincreasing on $[0,\pi]$.
If $k<0$, put $\lambda := \sqrt{-k}$. The hyperbolic law of cosines gives
\begin{align*}
\cosh(\lambda s(\theta))
= \cosh(\lambda a)\cosh(\lambda b)-\sinh(\lambda a)\sinh(\lambda b)\cos\theta.
\end{align*}
The right-hand side is nondecreasing in $\theta$, and $r\mapsto \cosh(\lambda r)$ is strictly increasing for $r\ge 0$, so $s$ is nondecreasing.
If $k>0$, use the already defined $\lambda=\sqrt{k}$. For $\theta\in I$, the spherical law of cosines on the chosen comparison branch gives
\begin{align*}
\cos(\lambda s(\theta))
= \cos(\lambda a)\cos(\lambda b)+\sin(\lambda a)\sin(\lambda b)\cos\theta.
\end{align*}
By the definition of $I$, the model opposite side satisfies $s(\theta)<\pi/\lambda$, so $r\mapsto \cos(\lambda r)$ is strictly decreasing on the entire branch used by $s$. Since $a,b\in (0,\pi/\lambda)$, we have $\sin(\lambda a)\sin(\lambda b)>0$, so the right-hand side is nonincreasing in $\theta$. Therefore $s$ is nondecreasing on $I$.
[/step]
[step:Apply monotonicity to compare the actual and model opposite sides]
By definition of $\beta$, the model triangle with side lengths $a,b,c$ satisfies
\begin{align*}
s(\beta)=c.
\end{align*}
By definition of the model hinge in the theorem statement, the comparison opposite side is
\begin{align*}
s(\alpha)=\bar{c}=d_{M_k^2}(\bar{\gamma}_1(a),\bar{\gamma}_2(b)).
\end{align*}
The previous angle comparison gives $\beta\le \alpha$, and the monotonicity of $s$ gives
\begin{align*}
d_M(\gamma_1(a),\gamma_2(b)) = c = s(\beta) \le s(\alpha) = d_{M_k^2}(\bar{\gamma}_1(a),\bar{\gamma}_2(b)).
\end{align*}
This is exactly the asserted hinge comparison.
[/step]