2. If you want the upstream project to benefit from your code, you might consider selectively re-licensing that portion of it under the same licence (or a compatible one). This should include appropriate boilerplate headers and/or SPDX identifiers, if upstream uses them.
3. An appropriately phrased warning will benefit the student, who has the opportunity to learn the basics of copyright before they accidentally copy a few thousand lines of code from somebody with a legal department.
--
edit: I believe I've located the project and PR in question. Given the context in the thread, if you decide that you're OK with code from your implementation being used as-is under the terms of the BSD license then I think a comment to that effect in the PR would be helpful to all involved.