If we recall from Baku's dream sequence from the tower, right after he woke up from it, he immediately started wondering what some aspects of his dream meant. Specifically, he asked Marco to check which way Suteguma returned to the first level from, and to confirm the existence of that sniper. I think he did the same thing during this match. As soon as he woke up and started breathing the Air-Bios, he considered why Leader wasn't present for the match. At this point I think the fact that Shion was the referee for the match (who he had not encountered on the island until then) was also a factor to consider. Since a mystery referee was overseeing the match, Baku may have thought Shion was Fukurou's or Hal's referee, and therefore the two of them were involved in the match.
That said, it's just an idea at that point, so it has to be tested. There's also the Calamity to consider as well. Since Baku had good reason to believe it would be "strongest available hands", he knew his 45 would eat all of the Jacks. If the Calamity was overlapping cards, that means the hands are determined on the spot instead of prior to the match, which tells him (with relative certainty) that Hal and Fukurou are the ones deciding the hands. He also knew the sum of Lalo's remaining cards is very high, since Lalo played 15 and 8. Stands to reason that Lalo's remaining strongest card (the straight card) would involve a Jack. The issue would be forcing Lalo to play his strongest card, since he's not thinking about it. From here Baku realized he can force Lalo to play his strongest card. Since the sum of Lalo's remaining cards was at least 145, his straight card would be cannibalized by the other cards for sure. As long as Lalo figures out the Law (with some "gentle nudging" from Usogui), he has to play the straight card.
In that sense, the plan from Baku to tell Lalo about the Law had several layers to it. The obvious one was forcing Lalo's air consumption, and I think the actual plan was to drag out Lalo's remaining straight and see what would happen with overlapping cards. If the Calamity happens, someone is deciding the card strength, and an overlap is actually possible. If not, he'd have to reconsider the circumstances up to that point.
Once the Calamity happened, Baku saw yet another referee, this time Hal's referee, drop down to break the Bios. Between Shion and Hal's referee, Baku was at this point convinced that Hal and Fukurou were involved, and were the ones deciding what hand a card formed. While the hatch was left open, he started making a ruckus to send a message to Hal, while masking it as anger over "Lalo forcing the Calamity". He sent something that only Hal, the "Hal that knew Madarame Baku" would understand. This, I think, is the miracle that Baku was banking on. That Hal would be able to reclaim his memories as his own, to understand what Baku's message really meant.