So your structure is the following:
s_TDP
--- s_TDP_Document
------ s_Document / Polysources
And you have the id of s_TDP? Than it´s comparable to a regular Part/Part AML/Manufacturer Part ("let´s look downwards") query:
<AML>
<Item type='Part' action='get' select='item_number' id='" + myID + "'>
<Relationships>
<Item type='Part AML' action='get' select='related_id(item_number)'/>
<related_id>
<Item type='Manufacturer Part' select='item_number'>
</Item>
</related_id>
</Relationships>
</Item>
</AML>;
Not sure about the PolyItem. For testing you can also start with the upper levels and then add the additional levels downwards until the query works.
I personally wouldn´t use loadAML. It´s possible to rewrite the Method so it basically does the same, but without having one large string. Check out the structure shown in these blog articles:
https://community.aras.com/b/english/posts/server-side-best-practices-part-3
https://community.aras.com/b/english/posts/server-side-best-practices-part-2