First S --> rAd is chosen
then A-->y is chosen which is false So backtrack to A and verify other options (1st backtrack).
then A-->z is chosen which is false So backtrack to A and verify other options (2nd backtrack).
Since all options of A are verified now backtrack to S and choose S-->rB. (3rd backtrack )
then B-->zzd is chosen which is false So backtrack to B and verify other options (4th backtrack).
then B--ddz is chosen which we want.
So total 4 backtracks I think.