it's a numeral.and those are weird
nr 5-21 have complicated rules , and then 25-31 and so on to 95-101, 105-121 and so on to infinity
but for male personal nouns instrumental is the only place numerals (5-21) change. dwunastu-dwunastoma, and male nouns take Genitive form in Nominative all the rest is normal for male personal that is
Polish is really hard if you're not used to cases. And numbers are quite complicated.
About "dwa" vs "dwunastoma"... well, I can't give you any reason, that's just how the declension looks like. https://en.wiktionary.org/wiki/dwana%C5%9Bcie#Declension