The guessing phrase takes time K, so is bounded by Z, and is thus polynomial in the input length. In the worst case a substring match requires testing every position of the candidate substring against every position of the target string. Here this would take time at most Z2 per string, or |R|Z2, altogether. Since |R|<=Z, this is also polynomial in Z, and hence in the length of the input.
Since there is a nondeterministic polynomial-time algorithm to solve the problem, the problem is in NP.
The propagation step requires modifying only polynomially many clauses (each in bounded time) and thus only polynomially many iterations. Checking whether an assignment leads to some clause having both literals assigned F requires only checking through the polynomially many clauses, as does finding a clause with one literal assigned F and the other unassigned. So each iteration takes polynomial time, and therefore the second and third steps of the algorithm require only polynomial time. The final step requires only a polynomial-time pass through the clauses, so the overall algorithm has polynomial time complexity.
Note that what makes the algorithm polynomial is that the backtracking is severely limited -- at most one decision has to be redone at any one time. It may not be clear that this is good enough (it certainly isn't for 3SAT), but the correctness of the algorithm may be shown as follows:
At the end of each successful propagation, each clause involving a variable with a truth assignment has a truth assignment of one of the forms TT, TF, FT, T*, *T, or **, where "*" stands for an unassigned value. This is because all singleton clauses have already been handled in step 1, the case FF cannot occur after a successful propagation, and propagation cannot terminate if there is an assignment of the form F* or *F.
No demonstration of unsatisfiability can involve a clause with one of the first five of the truth assignments, so any such demonstration must come from the clauses with values **. But by assumption these clauses involve completely new variables, so we may treat these clauses as a separate (and smaller) instance. So, under our assumption that the most recent propagation was successful, the old instance was unsatisfiable iff this new one is, and that is what the algorithm says.