I guess the title is self-explanatory, but according to Wikipedia, the second step is to take the minimal solution (A, B):
The minimal solution (A, B) with respect to some function of A and B, usually A + B, is taken. The equation is then rearranged into a quadratic with coefficients in terms of B, one of whose roots is A, and Vieta's formulas are used to determine the other root to the quadratic.
However, I do not fully see the need to take the minimal solution, can someone explain that step for me?
The transformation exists for all solutions, as do some others such as exchanging $a$ and $b$, or changing their signs. Call two solutions equivalent if they can be reached from each other by sequences of those transformations.
The purpose of choosing a "minimal" solution is to pick out a simplest equivalent of any given solution, which might then be seen to have some other special property, such as $ab=0$, that has implications for all its equivalent solutions (such as all of them having $(a^2+b^2)/(ab+1)$ a perfect square, since that ratio is invariant under the transformations).