Unless I misunderstand, the question comes down to "Publication A has cited Publication B, which is a primary source. Can I also cite Publication B, or would that be plagiarism?".
The answer is "Yes, it's fine for multiple people to cite the same primary source".
Always consider: he is the one signing the declaration to his university that he did not get help, not you.
Take the money
Give him the code
Obviously: Stop working for him
Inform his institution that you strongly suspect that a student used your services to plagiarize, paraphrase what you delivered (e.g. 12 tutorials), ask them how to proceed.
Someone at that level has been warned repeatedly about the dangers of plagiarism. Someone can't accidentally commit plagiarism to that degree any more than they could accidentally shoplift a book from a store.
If the problem is not addressed, the problem could get worse because the person has already been rewarded for "getting away with it."
The other answers are correct. This has to be reported. Doing so both protects yourself from accusations of plagiarism and protects the value of your degree. An institution that allows academic fraud quickly gets "a reputation."
Other answers have suggested that wholesale copying means that the plagiarist had access to an electronic copy, and that's ...
You overthought. I would just let it go and submit the letter as is. Most of the recommendation letters for PhD admission should be blinded to the applicants. You can apparently see the letter in your case, which actually is a bigger concern than the letter's originality.
How serious is plagiarism in a master's thesis?
In a word - very.
If someone knowingly copies verbatim three chapters off of another thesis (within a group or not), this is cause for severe disciplinary action.
You have graduated, but this puts you in a bad position as well - if you published your thesis after them, then your work will appear to be ...
Edit based on subsequent info by the OP...
This has to be raised with the relevant department / committee / Dean so that it can be addressed in a manner they see fit.
They could demand changes, or they could leave all alone.
If you don't report this, then if the Master's thesis gets published first YOU will be accused of plagiarism...
So you have to ...
If you are paraphrasing everything then a single citation is enough, but provide a hint, at least, about where that section ends.
If you want to use direct quotes make it obvious that you are quoting using some textual hints (quote marks are only one way). It might be necessary to note that your quotes of definitions, etc, come from the original work.