Event A is choosing a yellow pencil first, and Event B is choosing a yellow pencil second.
Initially, there are 12 pencils, 7 of which are yellow. Probability the first pencil is yellow
=P(A)= If a yellow pencil is chosen, there will be 11 pencils left, 6 of which are yellow.
Probability the second pencil is yellow
=P(B)= Given: Two pencils are chosen at random from the box without replacement.
So events are independent of each other.
Probability they are both yellow
=P(A∩B)=P(A)×P(B) =×=