Why does the Pythagorean Theorem have its simple form only in Euclidean geometry?
You can even generalize the law of cosines.
$$ \cos\left(\frac{z}{r}\right) = \cos\left(\frac{x}{r}\right) \cos\left(\frac{y}{r}\right) + \cos(\phi) \sin\left(\frac{x}{r}\right) \sin\left(\frac{y}{r}\right). \tag 1 $$
What we have is $$ \begin{array}{rcl} r^2 > 0 &\rightarrow& \textrm{spherical}\\ && \cos\left(\frac{z}{r}\right) = \cos\left(\frac{x}{r}\right) \cos\left(\frac{y}{r}\right) + \cos(\phi) \sin\left(\frac{x}{r}\right) \sin\left(\frac{y}{r}\right)\\\\ r^2 < 0 &\rightarrow& \textrm{hyperbolic}\\ && \cosh\left(\frac{z}{r}\right) = \cosh\left(\frac{x}{r}\right) \cosh\left(\frac{y}{r}\right) - \cos(\phi) \sinh\left(\frac{x}{r}\right) \sinh\left(\frac{y}{r}\right)\\\\ \lim_{\displaystyle r^2 \rightarrow \infty} &\rightarrow& \textrm{flat or Euclidean}\\ && z^2 = x^2 + y^2 - 2 \cos(\phi) x y \end{array} $$
Write it out... $$ \begin{array}{rcl} \displaystyle \left( 1 - \frac{1}{2} \left( \frac{z}{r} \right)^2 + \cdots \right) &=& \displaystyle \left( 1 - \frac{1}{2} \left( \frac{x}{r} \right)^2 + \cdots \right) \left( 1 - \frac{1}{2} \left( \frac{y}{r} \right)^2 + \cdots \right)\\ && \displaystyle \hspace{2em} + \cos(\phi) \left( \frac{x}{r} + \cdots \right) \left( \frac{y}{r} + \cdots \right) \end{array} $$ So you end up with $$ z^2 = x^2 + y^2 - 2 \cos(\phi) x y. $$