Clearing a Confusion regarding the Proof of equal no of a's and b's not being a regular language
Here is what your teacher meant. Let $M=\{a^nb^n:n\geq0\} $. We know $M$ is not regular. Since the intersection of regular languages is regular, if $L$ were regular then so would $L\cap a^*b^*=M$ be, reaching a contradiction. This shows that $L$ cannot be regular.