Baryon resonances in nuclei with applications to the two-nucleon system