Kotoko tells Masayuki and Yuki-onna that she knows precisely who the culprit is, and furthermore, that the police aren’t really seriously suspecting him at the moment, which explains why they haven’t been hounding him of late.
The reason? Evidence indicates that the victim Mahiru didn’t have any of her effects taken, and there’s every indication that she and the murderer had time to converse. In that time, she would have surely warned the murderer about the formal accusation she’d written up beforehand.
After all, Mahiru wasn’t trying to be killed, and would do everything she could to avoid that outcome. And if Masayuki killed Mahiru, he would have taken steps to obscure her identity and/or the location of her body. And the cops already all but ruled Masayuki out as a serious suspect after he was wishy-washy about his alibi, and unprepared to defend himself from the facts they’d collected thus far.
As for why it looked like Mahiru was trying to write Masayuki’s name on her hand? That was written by the true murderer after killing her. Before Kotoko says the name of the murder—Iizuka Nagisa—the name already pops up in Masayuki’s name as the only possible culprit.
Iizuka was the only one who sided with him when he was forced out of his company. She loved him, and murdered Mahiru and framed Masayuki so that he’d have no choice but to go to her for support. Sure enough, as Kotoko discuss this, Iizuka calls Masayuki, but he doesn’t answer.
Kotoko reveals that she didn’t deduce this from the mere facts of the case as they stand, but from the eyewitness ghosts who were at the scene of the crime when it occurred. They identified a woman that matched Iizuka’s description. If that’s “cheating”, Masayuki can hardly complain, as the information Kotoko gathered from the ghosts categorically clears his name.
With Masayuki’s name sure to be cleared and only a matter of time before Mahiru is arrested, Kotoko gives him and Yuki-onna her blessing—as long as they use protection! Kurou shows up shortly thereafter, terrifying Yuki-onna (as he tends to do). Kotoko then tells Masayuki and Yuki-onna to get lost and bone already, since they’re now in “the optimal mood.” Yuki-onna scoops Masayuki up and flies them back home.
While riding a flying yokai home, Kotoko and Kurou talk about the case a bit more. Kotoko explains further how Mahiru had overplayed her hand. She wanted a suspected Masayuki in the palm of her hand, but ultimately didn’t go any further lest the consequences of framing him cause him distress. The two conclude that Masayuki has and may well continue to have horrible luck with women.
Even Yuki-onna, who has been good to and for him thus far, is still a thoroughly volatile yokai who could one day freeze him to death for a slight real or imagined. Kurou likens Masayuki’s plight with his own, not just where his ex and Rikka are concerned but with Kotoko. Kotoko is not amused by this remark!