He would have needed a knife. Whale sharks don’t have blowholes.
According to International Geographic, he could simply grab one of the many cuttlefish in the whale’s stomach (or tummy) and use that to “saw” his way out through the non-existent blowhole. It’s very similar to the escape in The Poseidon Adventure. I suggest you watch a few more movies before you go around making snotty remarks.