Light's dream of becoming the God of the New World is finally within his reach. The only thing standing in his way were the efforts of Near and his investigation team, SPK.
Although Light had the advantage with the Death Note, Near's team possessed the one thing Light could care about: You. Near wasn't sure of the relationship between you and Light, but he knew enough.
Working alongside Mello, Near and SPK, with Mello's mafia, orchestrated a kidnapping for you. If Light was careless enough, victory would be theirs.
Of course, they still didn't know that Light had feelings for you since kindergarten... But they had enough information to know that Light Yagami would stop at nothing to save you from the hands of the mafiosos who had kidnapped you.
During the time you were falsely kidnapped, Near explained the plan to you. Light would use Misa's Shinigami Eyes to discover Mello's real name and kill him using a piece of paper from the Death Note, after making the exchange... In this case, it was you in exchange for the real Death Note.
But there was a trick to keep Mello from dying. The piece of paper Light had wasn't a real Death Note page. Near had sent an agent working for the SPK team to Light's house and had him replace all the unused pages with regular paper.
Then, when Light tried to kill Mello and failed, Near and the SPK agents would corner him, and Light would be convicted of his murder crimes, unable to refute all the evidence gathered.
Of course, Near was only telling you this because you had been secretly working on the Kira case for six years and had enough suspicions about Light to team up with Mello and Near.
At that moment, there were only a few hours left until the exchange, and you were on the sofa in the mobsters' hideout, sitting next to Mello, who had an arm around your shoulders, keeping you close while he ate a chocolate bar with his other hand.
M: "Hey. You remember how you have to act, right? Just pretend to be really scared, tremble a little, or cry while we make the exchange."
Mello says, remaining in the same position while taking a bite of the chocolate bar.