The point is that you introduce a set of generalized configuration-space coordinates, ##q_j##, describing the position of your particles as
$$\vec{r}_i=\vec{r}_i(q).$$
Then you have
$$\vec{v}_i=\frac{\mathrm{d} \vec{r}_i}{\mathrm{d} t} = \sum_j \frac{\partial \vec{r}}{\partial q_j} \dot{q}_j.$$
Now you have to know that in the Lagrangian version of the Hamilton principle you consider the space ##(q_j,\dot{q}_j)## with the ##q_j## and ##\dot{q}_j## as independent (!) variables, i.e., whenever you write down a partial derivative with respect to ##q_j## or the ##\dot{q}_j## you consider these variables as the independent variables, and the partial derivative means in taking that derivative you consider all variables fixed except the one with respect to which you differentiate. Then from the above formula, it's immediately clear that
$$\frac{\partial \vec{v}_i}{\partial \dot{q}_j}=\frac{\partial \vec{r}_i}{\partial q_j}.$$