Clear[extendedgcd]

    
extendedgcd[xx_, y_] := 
      Module[{x, k, rule, r, q, X}, 
x[0] = xx; x[1] = y; 
          k = 0; rule = {}; 
          gcdmatrix = {}; 
While[
            Not[x[k + 1] == 0], 
k = 
              k + 1; 
r[k] = 
              Mod[x[k - 1], x[k]]; 
q[k] = 
              Quotient[x[k - 1], x[k]]; 
x[k + 1] = 
              r[k]; 
AppendTo[rule, 
              X[k + 1] -> 
                Collect[
                  X[k - 1] - q[k]*X[k] /. rule, {X[0], 
                    X[1]}]]; 
AppendTo[
              gcdmatrix, {k, "|", x[k - 1], "=", q[k], "*", 
                x[k], "+", 
                r[k]}];
]; 
{x[k], 
            Coefficient[
              X[k - 2] - q[k - 1]*X[k - 1] /. rule, {X[0], 
                X[1]}]}
] /; 
        IntegerQ[xx] && IntegerQ[y]

ext = extendedgcd[x = 1526757668, y = 7835626735736]

ext[[2, 1]]*x + ext[[2, 2]]*y

gcdmatrix

extendedgcd[Fibonacci[21], Fibonacci[20]]

gcdmatrix