After being washed into the garden of the bungalow, Rikki Tiki Tavi is rescued by the family there and revived, and then his mission becomes quite clear. The family, particularly the father, speaks of the ability this mongoose will have to fight the snakes that are a real threat to them and their son.
When Rikki Tikki Tavi meets Nag and Nagaina it is clear that they will become his enemies, along with other snakes he might meet that would be a threat to the family that has adopted him, so to speak.
He kills Karait, the sand snake, but especially if the idea is that he "goes to war," it is with Nag and Nagaina as he must plan and there are a series of battles with them. He also enlists the help of Darzee and his wife as they wage their war against the king cobra and his wife.
In the end, Rikki kills Nag, his wife and destroys their eggs and the war his over. His courage and skill win the day and safety for Teddy and his parents.