As I see it, 'ta.m kutettha labbhaa' comes from "ta.m kuto ettha
labbhaa'.
'Ta.m' is concluding term referring to the whole following phrase.
kuto - from where
ettha - in this (world)
labbhaa - obtainable. If not wrongly remembered, it comes from 'labh'
+ 'tabba' and is used in indeclinable form.
On the whole, 'ta.m kutettha labbhaa' means 'From where in this (world)
could such condition/situation/etc. that.... be obtainable'
For example, 'ta.m kutettha labbhaa loke, yaduppanna.m na nassati'
means 'From where in this world could such condition be obtainable,
that what arose would not perish'. -- to point out the impermanence.