Complex sentence: The larvae were found to feed on "Gnidia kraussiana", and they sheltered in nests of "Lepisiota" ants, where the pupae were formed.
Split into simpler sentences: The larvae were found to feed on "Gnidia kraussiana". They sheltered in the ants' nests, where the pupae were formed.