Answer is: 31
1. Here B is in the right side of the Production Rule:
$A\rightarrow BD$ $\therefore FOLLOW(B)= FIRST(D)$
$FIRST(D)=d$ (Therfore it is in $FOLLOW(B)$)
Finally Putting $D\rightarrow \varepsilon$ in the Production $A\rightarrow BD$ then $FOLLOW(B)=FOLLOW(A)$
$FOLLOW(A)=a$ (From the Production rule $S\rightarrow Aa$)
$\therefore FOLLOW(B)= (d,a)$
As we have to write answer in the Decreasing order of INDEX (a,d) $\rightarrow$ (31)