6. Among the 99 positive integers $1,2, \cdots, 99$, if $k$ numbers are arbitrarily taken, such that there must be two numbers $a$ and $b (a \neq b)$ satisfying $\frac{1}{2} \leqslant \frac{b}{a} \leqslant 2$. Then the smallest possible value of $k$ is ( ).
(A) 6
(B) 7
(C) 8
(D) 9
6.B.

Divide the 99 positive integers from 1 to 99 into 6 groups so that the ratio of any two numbers in each group is within the closed interval $\left[\frac{1}{2}, 2\right]$, and the number of elements in each group is as large as possible. The groups are as follows:
$$
\begin{array}{l}
A_{1}=\{1,2\}, A_{2}=\{3,4,5,6\}, A_{3}=\{7,8, \cdots, 14\}, \\
A_{4}=\{15,16, \cdots, 30\}, A_{5}=\{31,32, \cdots, 62\}, \\
A_{6}=\{63,64, \cdots, 99\} .
\end{array}
$$

When taking 6 numbers, for example, one number from each of $A_{1}, A_{2}, A_{3}, A_{4}, A_{5}, A_{6}$, such as taking $1,3,7,15,31,63$, the ratio of any 2 numbers among these 6 numbers is not within the closed interval $\left[\frac{1}{2}, 2\right]$. Therefore, $k>$ 6. Hence, $k \geqslant 7$.
When $k=7$, taking any 7 numbers from the 99 numbers, by the pigeonhole principle, there must be 2 numbers belonging to the same $A_{i}(1 \leqslant i \leqslant 6)$, and the ratio of these 2 numbers is within the closed interval $\left[\frac{1}{2}, 2\right]$.
In conclusion, the minimum value of $k$ is 7.