A big problem with that is where to find whale-sized equivalents of uteruses to gestate the clones.
Not a problem. As seen in "A Man Alone", they can do it from start to finish in simple vats, at least in the 24th century.
They did have the genetic material/means to clones whales. However, since no living humpback existed there would be no adults to raise the young clones.
We don't even need that much rationalization here. Suffice to assume they have the material, but they just plain don't have any motivation to make use of it - not until it turns out that Earth needs whales in the next fifteen minutes or everybody will die, which isn't exactly the best motivation for starting cloning.
Why return whales to the oceans? Just to prove that mankind has cleaned up its act (and said oceans)? The whales themselves won't care. The oceans won't care. Heck, all sorts of krill and shrimp will be elated with the whales gone. AFAWK, they haven't restored the buffalo, either, and those never really went totally extinct.
Besides, Earth fears new Khans so intensely that it has banned many sorts of helpful gene therapies. Hobby cloning is probably an offense punishable by six months in therapy.