Weak decays of heavy hadrons into dynamically generated resonances