Renaming based on a parent folder

Please forgive me if this has been answered elsewhere, but I still can't figure it out. I'm trying to get a grip on dealing with subfolders (yes, I've read the user guide & sticky thread) and the 'subfolder depth' condition. What I'm trying to do, is rename files/folders based on a parent folder, but not necessarily the immediate parent folder:
Folder 1 > Subfolder 1 > Subfolder 2 > Subfolder 3
Currently I am able to rename Subfolder 3 adopting it's source folder (immediate parent) name (Subfolder 2) using 'Rename with pattern: source folder', but what I'd like to do is rename it based on Subfolder 1 or Folder 1, ideally only taking part of that folder's name. Is there a 'source folder depth' function I could use to call out which folder to reference the name from?
Here's a real-world example:

What I'd like to get Hazel to do, is rename files & folders based on a portion of the ##-######.XXXXXX folder name.
So: (01-199606.Azusa > Photos > QSP Photos), would become (01-199606.Azusa > Photos > QSP Photos-Azusa]).
Is this possible? Is my request clear?
Thanks.
Folder 1 > Subfolder 1 > Subfolder 2 > Subfolder 3
Currently I am able to rename Subfolder 3 adopting it's source folder (immediate parent) name (Subfolder 2) using 'Rename with pattern: source folder', but what I'd like to do is rename it based on Subfolder 1 or Folder 1, ideally only taking part of that folder's name. Is there a 'source folder depth' function I could use to call out which folder to reference the name from?
Here's a real-world example:

What I'd like to get Hazel to do, is rename files & folders based on a portion of the ##-######.XXXXXX folder name.
So: (01-199606.Azusa > Photos > QSP Photos), would become (01-199606.Azusa > Photos > QSP Photos-Azusa]).
Is this possible? Is my request clear?
Thanks.