Step 1: Set up the Bayes framework.
Let $H_1$ be choosing Box I and $H_2$ choosing Box II, each with prior $\tfrac12$. Let $E$ be drawing a non-prime. We want $P(H_1\mid E)$.
Step 2: Count non-primes in Box I.
Among $1$ to $30$ there are $10$ primes $(2,3,5,7,11,13,17,19,23,29)$, so non-primes number $30-10=20$. Hence $P(E\mid H_1)=\tfrac{20}{30}=\tfrac23$.
Step 3: Count non-primes in Box II.
Among $31$ to $50$ the primes are $31,37,41,43,47$, that is $5$ primes, so non-primes number $20-5=15$. Hence $P(E\mid H_2)=\tfrac{15}{20}=\tfrac34$.
Step 4: Write Bayes' formula.
\[ P(H_1\mid E)=\frac{P(H_1)P(E\mid H_1)}{P(H_1)P(E\mid H_1)+P(H_2)P(E\mid H_2)}. \]
Step 5: Cancel the common prior.
The shared factor $\tfrac12$ cancels, leaving \[ P(H_1\mid E)=\frac{2/3}{\,2/3+3/4\,}. \]
Step 6: Combine the fractions.
The denominator is $\tfrac{8+9}{12}=\tfrac{17}{12}$, so $P=\tfrac23\cdot\tfrac{12}{17}=\tfrac{8}{17}$, which is option 2.
\[ \boxed{\tfrac{8}{17}} \]