Non-live shows are recorded in whatever order is convenient for the show, and the producers then splice and slice everything so they end up in the order everyone sees.
Re Gleb being in 2 places at the same time - I don't think the producers care that viewers work out the show isn't live, contrary to what many on this forum think. In fact one could say he was in 3 places at the same time as there wasn't enough time after the pro dance for him to change into his "saturday night" outfit/make-up.