Some identities involving second kind Stirling numbers of types B and D