Although I'm not really making a recommendation, sensible experimentation with these fish in reef aquariums might not be as dangerous as one would initially predict. I cannot seem to find out how long they are supposed to live. Hi Lisa, I couldn't find any information on the longevity of these animals either. I would estimate the butterflyfish could live 10-20 years in captivity. You didn't indicate which species you have and this could make a difference.
Many species are notoriously difficult to maintain in healthy condition for very long.
The shrimp will probably live between 5-10 years in captivity. Generally speaking, any animal has the potential to live longer in captivity than in the wild. This is primarily because predators are excluded and because accidental deaths are nearly eliminated. Diseases and injuries are often treatable extending the life span as well.