For clarity, it is easiest if you can put the third-party source code in a separate source file. Then you can put the copyright and license notices without any issue at the normal place (the top) in the file.
If you can't use a separate source file and both projects use the same license (or the third party code uses a dual license with the license of your project among the choices), then you should add the copyright of the third party code next to your copyright. You don't have to copy over the license, because that should match the already existing license statement for your own code.
I once had a situation where I included third-party code with a different license into a source file, and I solved that by stating at the top of the file (next to the copyright/license applying to the bulk of the file) that some functions are subject to a different license. Then, in a comment block directly next to the relevant functions, I included the license that applied to that function.