\(\text{Let's split the students up into three non-intersecting sets}\\ F=\{\text{students taking only french}\}\\ S=\{\text{students taking only spanish}\}\\ FS=\{\text{students taking both french and spanish}\}\\\)
\(|FS|=|F|+|S|-|F\cup S| = 18+21-25 = 14\\ |F|-18-14=4\\ |S|=21-14=7\)
\(\text{4 outcomes lead to Michael being able to write about both classes}\\ (F,S),~(FS,S),~(FS,F)~,(FS,FS)\\ \text{These outcomes are non-overlapping so the probability}\\ \text{of their union is the sum of their individual probabilities}\)
\(P[(F,S)] = \dfrac{\dbinom{4}{1}\dbinom{7}{1}}{\dbinom{25}{2}}=\dfrac{7}{75}\\ P[(FS,S)] = \dfrac{\dbinom{14}{1}\dbinom{7}{1}}{\dbinom{25}{2}}\dfrac{49}{150}\\ P[(FS,F)] = \dfrac{\dbinom{14}{1}\dbinom{4}{1}}{\dbinom{25}{2}}=\dfrac{14}{75}\\ P[(FS,FS)] = \dfrac{\dbinom{14}{2}}{\dbinom{25}{2}}=\dfrac{91}{300}\)
\(P[\text{M. can write about both schools}] = \dfrac{28+98+56+91}{300} = \dfrac{91}{100}\)
.