This is a simple probability problem to solve, first, we need to know how many cookies we have inside the bag. So we have 8 chocolate chip cookies + 4 peanut butter cookies + 9 sugar cookies + 6 oatmeal cookies = 27 cookies (total). Once we have the total we can see the probability to first randomly select a chocolate chip cookie is P (first chocolate chip cookie) = 8/27 (we just have 8 chances to select a chocolate chip cookie between 27 cookies).
After we select a chocolate chip cookie and eat it, now we just have 26 cookies inside the bag. So our probability to select randomly a sugar cookie is P (sugar cookie second) = 9/26 (we just have 9 chances to select a sugar cookie between 26 cookies). Now we just need to combine those two probabilities, and to do that as a sequence (probability 1 first, next probability 2) we use the product operator *. So P(chocolate chip cookie first and sugar cookie second) = P (first chocolate chip cookie) * P (sugar cookie second) = (8/27) * (9/26) = 72/702.
Finally, our final answer is P(chocolate chip cookie first and sugar cookie second) = 0.1025 (approximately).