I guess you have to decide what you want and understand how the code can make it happen. There are many more considerations than what you have thought of I suspect. Due to the issues that I explain below, this is why you have what you have now. There is nothing really wrong. You just need some adjustments since there are many considerations. This should be the first part of any thread so that you get a solution that meets the goal(s).

1. You must first answer is this a one time run or many runs? This is critical.

2. If the p2 path is in the p (parent) path, code will need to skip merging pdfs in p2.
a. If (1) is multiple runs, then one might: create a subfolder of parent named Run1, Run2, Run3, etc. Or, maybe, a merged folder that exists already but it would only contain the subfolders created during runtime called Run1, Run2, etc. with the (3) names.

3. What file naming convention is used? e.g.
a. Subfolder merged file to be called Merged.pdf.
b. p2 copied Merged.pdf should be copied to p2 as subfolder's name dot pdf. e.g. SubFolder1.pdf
i. If 3b is used, and another subfolder is called Subfolder1, how would code handle that?

4. If (1) is multiple runs, then code must delete the previous merged file if one exists before merging in each subfolder.

If you know that your subfolder names would never be duplicated, I would go with that method. So, rather than PDF_1.pdf, it would be maybe in SubFolder1\Merged.pdf and copy to p2 folder as p2\SubFolder1.pdf.