If we don't allow to repeat a pick on the sample, than each student we pick will change the probability of picking the next one and, since we don't know the total number of students at her high school, we wouldn't be able to calculate this probability.
Thus, to calculate this with the provided information, we need to assume that we can repeat a student in the sample, that way the probability of picking a chemistry student will always be 40%.
So, with that assumption, we can use binomial probability to calculate the probability of picking at most from from that have taken chemistry on the 12 picked students.
Since we want at most 4, we have the consider the term of the binomial for which 0 students from chemistry were picked, the term for 1 from chesmitry, the term for 2, the term for 3 and the term for 4.
Let p be the probability of picking 1 student from chemistry, n be the total number of students picked and k be the number of students on those that are from chemistry. Then, each term will have the following:
In this case, n is always 12 and p is always 0.4, so 1 - p is always 0.6.
k will vary from 0 to 4 and the total probability will be the sum of each term.
The term for 0 students from chemistry has k = 0, so:
The term for 1 student from chemistry has k = 1, so:
The term for 2 student from chemistry has k = 2, so:
The term for 3 student from chemistry has k = 3, so:
The term for 4 student from chemistry has k = 4, so:
So, the total probability will be the sum of all these term:
So, the probability is approximately 0.438.