Summarizing the conversation from above, your approach is incorrect because it overcounts several scenarios since it somehow distinguishes between people selected in the first two steps versus being selected in the third step so you get committees reappearing in your count such as
$$(A)(a)(BCd)~~~~~~(B)(d)(AaC)$$
despite them both being the same five person committee $(AaBCd)$.
In order to apply multiplication principle, you must ensure that each outcome is counted exactly once (or for a more complicated phrasing, exactly the same number of times so you can divide by that number later on). This is not the case in the setup that you have so far.
Instead, we count how many arrangements there are if we don't care about the condition that there must be at least one student and at least one teacher. In these arrangements, some will be good and some will be bad. By subtracting away how many are bad, we are left with the number of good arrangements.
There are $\binom{26}{5}$ if we don't care.
$\binom{12}{5}$ are bad because they use only teachers (and have no students)
$\binom{14}{5}$ are bad because they use only students (and have no teachers)
Ordinarily we would need to be careful because we might accidentally subtract away some of these bad outcomes twice, so we add back in again the number which violate both to correct it so that the bad outcomes were only subtracted a total of once each, but in this case there are no outcomes which simultaneously have no students and no teachers, so we are only adding back zero.
there are then $\binom{26}{5}-\binom{12}{5}-\binom{14}{5}$ arrangements.
An alternate solution:
Break into cases based on the number of students in the committee. There could be $1,2,3$ or $4$ students. With $k$ students, pick which $k$ students are in the committee and pick which $5-k$ teachers are in the committee.
There are then $\binom{14}{1}\binom{12}{4}+\binom{14}{2}\binom{12}{3}+\binom{14}{3}+\binom{12}{2}+\binom{14}{4}\binom{12}{1}$ arrangements.
One can see that the earlier employed method is less computation heavy and is easier to calculate in this case, and in particular in larger cases too