Cocos would be a better place to see hammerheads, in my opinion. The 36-hour boat ride is a deterrent to some, but I prefer it to the handful of flights it might take you to get to Layang-layang from Montreal (Montreal--> San Francisco--> Tokyo-->Kota Kinabalu-->Layang-layang, or similar). At least on the boat you can go to your bunk, stretch out, and sleep. (Maybe you can do that on flights--I can't.)
On my trip to Layang-layang, over a decade ago, we did encounter hammerheads on multiple dives, maybe 3 or 4 out of 12 dives, but they were as deep as 55 meters, which made for short dives and brief encounters. In Cocos, we saw hammerheads on every dive that we expected to, probably 20 of the 25 dives I did, usually between 27 and 40 meters deep. And they were often close encounters, within a few feet of us. The divemasters did say that we had unusually good diving on that trip, but hammerheads weren't even the highlight. We saw Whalesharks; a baitball; dolphins; a marlin; tuna; and Galapagos, Blacktip, Whitetip, and Silky sharks.
In general, whether in Cocos, Galapagos, Layang-layang, or elsewhere, schooling Scalloped Hammerhead sightings are very dependent on water temperature, from what I have read. Avoid El Nino years when warm water might push the thermocline much deeper, or change hammerhead migration completely. I have also seen schooling hammerheads in Sipadan, and I believe they are seen in the Red Sea as well. I have seen a hammerhead in Belize (from too far away to ascertain which species) and Papua New Guinea (Great Hammerheads). If they are not schooling it is hard to predict sightings, but
Jim Abernethy's Shearwater brings Great Hammerheads in with chum, along with Tiger Sharks, Bull Sharks, etc., right there in the Bahamas.