Can someone help me understand the sentence structure for this example? Why do I desperately want to place "an madra" at the end of the sentence when forming this in my head? I'm guessing it has something to do with the "in" trouble part rather than the dog having trouble or trouble at the dog (ag/ar).
So, tá is the verb. It comes first. Here, an madra is the subject, meaning it will follow the verb. the i dtrioblóid is the rest of the sentence, so comes after that. So, yes, it has to do with the i as opposed to trouble being 'at' or 'on' the dog, in which case it'd be Tá trioblóid ar an madra.