It looks like step 4 should say something like (edited):
If b evenly divides a×r_i, where r_i is the current value, divide by b. If not, add or subtract p until the result is evenly divisible by b, then divide by b.
And step 6 should loop back to step 4 and define r_i to be the "result".
This method is very interesting and systematic, but it seems pretty complicated compared to ad hoc reasoning. E.g. 34 is a multiple of 17, so 680 must be too; 986-680 = 306, which is 34 away from 340, a multiple of 17, so 17 is a factor of 986.