he may have just borrowed the names but since jiraiya, tsunade and orochimaru are related in the show and also were in the mythological story about them. its more likely that he used certain aspect from the story to and not just the names. i think its the same with for example kyuubi. a kitsune that grows 1 tail each 100 years until it gets nine tails. i know for a fact that he didnt just borrow jiraiyas name since he was a wizard called gama-sennin. and gama means toad . jiraya uses toad jutsus and summons.