Yeah, it's のみたがっているんですが. The いる is an auxiliary verb that means progressive action or that something is in some state (when used with transitive verbs). So, "he/she/they want something to drink." For the のだ part, well, that's been addressed a lot. I'm too lazy to search for it now, but I'm sure you'll find a lot if you search. And が is used to state something indirectly.