The keys for the trick are the hedge bets and the 'boat' activation code. It's really outstanding move, actually. After all, what can we expect from the useless ones they sold in the waiting room?
Law of Ueki's power to turn x into y is still the most creative concept of fighting manga until today. It could've been explored more, but too bad the author had to introduce Sacred Treasure. Law of Ueki Plus didn't do justice for it either, no pun intended. ?
I kinda hope it is jumping...
So can we assume that the reason Kindaichi doesn't want to solve the case anymore was after Kin succeeded solving the case which resulted in Takato being prisoned?