The second problem that we need to solve is to determine how long to keep recursing. Equivalently, we can ask ``what is the base case?'' which we want our code to check for. The answer to that stems from the relationship between the recursion we are making and the GCD algorithm described in the book in section 1.2.5.
In that section, it is noted that ``It is possible to show that starting with any two positive integers and performing repeated reductions will always eventually produce a pair where the second number is 0''. So this means that if we keep on recursing we will reach a point where we will be trying to solve an equation with b=0, since b is the ``second number'' in our case.
When b=0, what will ``a'' be? Since we are also assuming in this exercise that a and b have GCD = 1, it must mean a=1 when b=0.
Consequently, at this point in the recursion, we will really be trying to solve an equation x = 1, for which the answer is trivial!. The procedure returns a list where the value of x is 1, and the value of y can be anything you want. (The fact that y can be anything is related to the fact that ax+by = 1 define a line.) In our case, we choose the value of y to be 0.