There are
[tex]12+20+13=45[/tex]
female teachers, and
[tex]8+15+7=30[/tex]
male teachers.
This means that, out of a total of 75 teachers, 45 are female, leading to a probability of
[tex]\dfrac{45}{75}=\dfrac{3}{5}[/tex]
of selecting a female teacher.
If we restrict to those with more than 8 years service, there are 13 female teachers and 7 male teachers.
So, out of a total of 21 teachers, there are 13 female teachers, leading to a probability of
[tex]\dfrac{13}{21}[/tex]
of selecting a female teacher.