To find the expected number of unsharpened pencils in the basket, we can use the ratio of unsharpened pencils in the sample to estimate the total in the entire basket.
Avery selected 50 colored pencils, and 2 of them were unsharpened. This gives us a proportion of unsharpened pencils in the sample:
\[ \text{Proportion of unsharpened pencils} = \frac{2}{50} = 0.04 \]
Now we can use this proportion to estimate the expected number of unsharpened pencils in the entire basket of 300 pencils:
\[ \text{Expected number of unsharpened pencils} = 0.04 \times 300 = 12 \]
Thus, the expected number of unsharpened pencils in the basket is 12.
Therefore, the answer is A. 12.