Entering and exiting the basis
Let $\v x$ be a basic feasible solution with basic indices $B(1), B(2), \ldots, B(m)$. We want to move from $\v x$ to a feasible solution $\v x' =\v x + \theta\v d$ (where $\theta>0$) by making some non-basic variable $x'_j$ positive while keeping all other non-basic variables fixed at 0. We describe this by saying $x_j$ enters the basis.
We insist $d_j = 1$ and $d_i=0$ for all other non-basic indices $i\neq j$. In order for $A\v x' = A(\v x + \theta\v d) = \v b$ to hold, since $A\v x = \v b$, we need $$ \begin{align*} \v 0 = A\v d = \v A_jd_j + A_B \v d_B \implies \v d_B = -B\inv \v A_j. \end{align*} $$ This $\v d$ is called the $j$-th basic direction.
To ensure $\v x'\geq \v 0$, we need $-\theta d_i\leq x_i$ for all $i$. This is automatically satisfied when $d_i \geq 0$. So the range of $\theta$ for a feasible $\v x'$ is $$ \begin{align*} 0 < \theta \leq \min_{i:\ d_i<0}\left(\frac{x_i}{-d_i}\right) = \min_{i=1,2,\ldots,m:\ d_{B(i)}<0} \left(\frac{x_{B(i)}}{-d_{B(i)}}\right). \end{align*} $$
If we require $\v x'$ to be a basic feasible solution, then take $\theta$ to be its upper bound.