Classify the root before applying the contest rule:
ExampleRootType
ضَرَبَض ر بSound
قَالَق و لHollow-wāw
دَعَاد ع وFinal-wāw
وَعَدَو ع دInitially weak
بَاعَب ي عHollow-yāʾ
رَمَىر م يFinal-yāʾ
The spelling قَالَ and بَاعَ contains alif in both cases, but their underlying middle radicals differ. That difference determines the appropriate branch of the textbook's rule.