This gcd is computable purely mechanically by a slight generalization of the Euclidean algorithm which allows us to scale by integers $\,c\,$ coprime to the gcd during the modular reduction step, i.e.
Lemma $\, \ \ \quad\qquad\qquad\bbox[8px,border:1px solid #c00]{(a,b)\, = \,(a,\,cb\bmod a)\ \ \ {\rm if}\ \ \ (a,c) = 1}\qquad\qquad $
which is true since $\,(a,c)= 1\,\Rightarrow\, (a,\,cb\bmod a) = (a,cb) = (a,b)\ $ by Euclid. When computing the gcd of polynomials $\,f(x),g(x)$ with integer coef's, we can use such scalings to force the lead coef of the dividend to be divisible by the lead coef of the divisor, which enables the division to be performed with integer (vs. fraction) arithmetic. Let's do that in the example at hand.
$$\ \ \begin{align} (\color{#c00}5x\!-\!1,\, 13x\!+\!2) &= (5x\!-\!1,\,13\:\!(\color{#c00}{5x})+\color{#c00}5\cdot 2)\ \ \ \text{by Lemma: scale 2nd arg by $\,\rm\color{#c00}{c=5}$}\\[.2em]
&= (\color{#0a0}5x\!-\!1,\,23)\ \ \ {\rm by}\ \ \color{#c00}{5x\equiv 1}\!\!\!\pmod{5x\!-\!1}\\[.2em]
&= (x\!-\!14,\,23)\ \ \ \text{by Lemma: scale 1st arg by $\,\color{#0a0}{5^{-1}\!\equiv 14}\!\!\!\!\pmod{\!23}$}
\end{align}\qquad$$
By $\,23\,$ prime, the gcd $= 23$ or $1$, when $\,23\mid x\!-\!14\,$ or not, resp.
Remark $ $ Here is another example done this way - which explains how it can be viewed as applying a more general Polynomial Division Algorithm where the divisor is nonmonic (i.e. lead coef $\neq 1$), and here is another one.
There are many ways to compute the modular inverse $\,1/5 = 5^{-1}\pmod{23},\,$ e.g.
$\bmod{23}\!:\,\ \color{#0a0}{\dfrac{1}5} \equiv \dfrac{5}{25}\equiv \dfrac{28}2\equiv \color{#0a0}{14}\ $ by Gauss's Algorithm.