Compliance with the permissive license MIT:
The MIT license is a 'template' license: it must be instantiated by the intended copyright information. The license then requires that both - the copyright line and the license text - is distributed together with the open source program: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software."
Compliance with the strong copyleft license GPL:
The GPL allows to distribute the source code "provided that one conspicuously and appropriately publishes on each copy an appropriate copyright notice and disclaimer of warranty [...] and gives any other recipients of the Program a copy of this License along with the Program". Additionally, the GPL requires that each code which uses the GPL licensed library etc. is also licensed under the GPL (copyleft effect)