Complex sentence: Koga and Inuyasha don't get along but the two do team up whenever Kagome's life is in danger whenever they go up against Naraku or one of his demons.
Split into simpler sentences: Koga and Inuyasha don't get along but the two do team up whenever Kagome's life is in danger. Whenever they go up against Naraku or one of his demons.