There's no rules for choosing between 二 and 两, but more of the regional customary expression, although 两 is used more frequently orally to my intuition.
However, indeed the 二 is usually used at the last (smallest two, especially when two is the ending number), and 两 is usually used at the beginning (biggest two, especially when two is the leading number).
Still, instinct language feeling, no rule.