Expansion of certain type of determinants