Each coat and two pairs of trousers have 1×2=2 collocation methods.
So three coats and two pants have a 3×2=6 collocation method.
Each hat, three coats and two pairs of trousers have 1×3×2=6 collocation methods.
So the collocation method of two hats, three coats and two trousers is 2×3×2= 12.