There is a faster way using the Inclusion-Exclusion Principle. Since you have not seen it before, I will only reference the idea of it.
Like what you started doing, we will first attempt to count all committees that do not have at least one member from each group. Note that this equivalent to counting all committees such that at least one of the groups is not represented on the committee.
Let $N$ represent the number of committees that do not have at least one member from each group.
Let $N_e$ equal the number of committees that do not contain an engineer. We have $$N_e = \binom{6+7}{5} =\binom{13}{5}$$ because if there are no engineers, then our $5$ person committee must solely be chosen from scientists and mathematicians. Similarly you can define and calculate $N_s$ and $N_m$.
We would like to say that $N$ is equal to $N_e + N_s + N_m$. However, this would be overcounting the committees where at least two of the groups are not represented in the committee. For instance, committees that do not contain engineers and scientists would be counted by both $N_e$ and $N_s$. Thus, we need to subtract these off.
Let $N_{e,s}$ be the number of committees that do not contain engineers and scientists. We have that $$N_{e,s}=\binom{6}{5}$$ since we can only choose mathematicians. Similarly you can define $N_{e,m}$ and $N_{s,m}$ and calculate what their values are.
Now we recalculate by setting $N = N_e + N_s + N_m - N_{e,s} - N_{e,m} - N_{s,m}$. However, once again this might not be correct since we might have subtracted too much. We might have undercounted the number of committees that have all three groups not represented in the committee. However, if all three are not represented, there is no way to form a committee of five.
Thus, $N = N_e + N_s + N_m - N_{e,s} - N_{e,m} - N_{s,m}$. This means that the number of committees that have at least one member from each group is equal to $$\binom{21}{5} - N = \binom{21}{5}- N_e - N_s - N_m + N_{e,s} + N_{e,m} + N_{s,m}$$.