How to copy and paste 2 snippets into one blueprint?

Hi there, I am trying to copy those snippet into my project’s bp to make some use ,but there are 2 part of the snippet.I am quite confused how to make it right.
Could someone please tell me how to copy-paste these two code snippets into my blueprint and make it work?
At the bottom, the Tree Part