Deep Wizardry by Diane Duane

Two young wizards answer a desperate call from the sea to help a pod of humpback whales whose songs and very lives are endangered by an ancient, destructive force; learning to take whale form and join the migration, they face peril, loss, and agonizing choices that test their courage and friendship and deepen their understanding of what it truly means to be a wizard.

Purchase from Bookshop.org