Recall that we have expressed f(x)=h(x)/g(x), where g(x)=\prod_j g_j(x)^j and \kappa_j=\operatorname{deg} g_j(x), where g_j(x) is a squarefree polynomial with coefficients in \mathbb{F}_q. Assume without loss of generality that g_j(x) is a monic polynomial for all j. Note that the degree of g(x) is
\sum_j j \kappa_j=d+2-(r+1)=d-r+1.
Since f_{\infty}(x) is a constant, we find that \operatorname{deg} h(x)\leq \operatorname{deg} g(x). Furthermore, note that by construction, the polynomials g_i(x) and g_j(x) are coprime for i\neq j.
First, we consider the case when \kappa_j=0 for all j\geq p. In this case, for every pole \alpha of f(x), we have that d_{\alpha}<p. Thus, the condition (?), which requires that the coefficient of x^j be zero in f_\alpha(x) whenever p|j, is automatically satisfied. Furthermore, h(x) is coprime to g(x). Therefore, the result in this case follows from Lemma 3.4. In greater detail, the lower bound proceeds from the following observation
\left(1-\frac{d+2}{q}\right)\leq \left(1-\frac{d+2-r}{q}\right).
Next, assume that for some j>p, we have that \kappa_j\neq 0. In this case, the same calculation goes through with the one difference being that there is an additional constraint requiring that the coefficient of x^{j} in f_\alpha(x) is 0 for all j>0 such that p|j. This condition was automatically satisfied in the previous case. In this case, this gives an additional condition on h(x), which forces the number of choices to be
\leq \left(1-\frac{1}{q}\right)^{\lambda_2} q^{d+2}=o(q^{d+3}).
Let us explain this in greater detail.
Since \kappa_j\neq 0 for some j>p, there exists a pole \alpha of f(x) such that d_{\alpha}=j>p. The coefficient of x^p in f_\alpha(x) is required to be 0. Set \eta(x)\in \mathbb{F}_q(x) to denote the function given by
\eta(x):=\sum_{\alpha'} \frac{1}{(x-\alpha')},
where \alpha' ranges over the \mathbb{F}_q-conjugates of \alpha. Note that \eta(x)^p=\sum_{\alpha'} \frac{1}{(x-\alpha')^p}. This function \eta(x)^p has coefficients in \mathbb{F}_q and is expressed as \eta(x)^p=\frac{\eta_1(x)}{\eta_2(x)}, with
\operatorname{deg} \eta_1(x)\leq \operatorname{deg} \eta_2(x)\leq \kappa_j.
Moreover, note that \eta_2(x) divides \prod_{\alpha'} (x-\alpha')^p, and hence divides \prod_{\alpha'} (x-\alpha')^j. Since this latter product divides g(x), it follows that \eta_2(x) divides g(x). For any choice of 0\neq c\in \mathbb{F}_q, the function f_c(x):=f(x)+c \eta(x)^p does not satisfy condition (?) since now the coefficient of x^p in f_{c,\alpha}(x) is nonzero, and p<j=d_\alpha. We may express f_c(x)=h_c(x)/g(x), where
\operatorname{deg} h_c(x)\leq \operatorname{deg} g(x).
The number of functions f(x)=h(x)/g(x) satisfying the conditions of Lemma 3.4 is \leq \left(1-\frac{1}{q}\right)^{\lambda_2} q^{d+3}. On the other hand, from an admissible function f(x)=\frac{h(x)}{g(x)}, we have constructed q new functions f_c(x), as c ranges over \mathbb{F}_q. Only one of which is admissible (i.e., when c=0). It is easy to see that if f(x) and F(x) are distinct admissible functions, then f_c(x)\neq F_{c'}(x) for all c,c'. Hence, the total number of admissible functions for the partition vector \kappa is
\leq \frac{1}{q}\left(\left(1-\frac{1}{q}\right)^{\lambda_2} q^{d+3}\right)=O(q^{d+2})=o(q^{d+3}).