He couldn't, as mentioned a number of times, Lights's ultimate plot to use Rem to kill L was a huge gamble, however things were more of less siding with him
L said to Light (with Rem present) that the Kira's will be executed
Misa was not present in the room when L said to Light that the Kira's would be executed, this means Rem could not see if Misa's life span had changed as a result of L's decision to see the Kira's executed or confirm if Light's actions caused the change (Rem had pointed out to Light before the switching of the Death Notes (i think when Misa first goes to Light's place) that Misa's lifespan was monitored )
L had explained to Light the physical evidence he had found indicating Misa as the 2nd Kira before her imprisonment, this would be enough for Misa to be imprisoned once again and now that L knew how Kira kills he would be able to find the Death Note much faster (Misa now had her original Death Note but now owned by Ryuk, because Rem would've explained its use to Misa the rules wouldn't have been written, before learning of the Death Note Light did plan on explaining that the Death Note was a log for the Kira Case which would then explain the people's names and times)
All Rem could do at the time was assume that L would cause Misa's death and because L had also noted that Misa was just about to be arrested Rem had no time to investergate