What is the name of the person whose apartment she enters in time to see Cavaradossi being escorted to an antechamber?
Scarpia's apartment in the Palazzo Farnese, that evening
Scarpia, at supper, sends a note to Tosca asking her to come to his apartment, anticipating that two of his goals will soon be fulfilled at once. His agent, Spoletta, arrives to report that Angelotti remains at large, but Cavaradossi has been arrested for questioning.  He is brought in, and an interrogation ensues. As the painter steadfastly denies knowing anything about Angelotti's escape, Tosca's voice is heard singing a celebratory cantata elsewhere in the Palace.
She enters the apartment in time to see Cavaradossi being escorted to an antechamber. All he has time to say is that she mustn't tell them anything.  Scarpia then claims she can save her lover from indescribable pain if she reveals Angelotti's hiding place. She resists, but the sound of screams coming through the door eventually breaks her down, and she tells Scarpia to search the well in the garden of Cavaradossi's villa.
Scarpia orders his torturers to cease, and the bloodied painter is dragged back in. He's devastated to discover that Tosca has betrayed his friend. Sciarrone, another agent, then enters with news: there was an upset on the battlefield at Marengo, and the French are marching on Rome. Cavaradossi, unable to contain himself, gloats to Scarpia that his rule of terror will soon be at an end. This is enough for the police to consider him guilty, and they haul him away to be shot.
Scarpia, now alone with Tosca, proposes a bargain: if she gives herself to him, Cavaradossi will be freed. She is revolted, and repeatedly rejects his advances, but she hears the drums outside announcing an execution. As Scarpia awaits her decision, she prays, asking why God has abandoned her in her hour of need: "Vissi d'arte" ("I lived for art"). She tries to offer money, but Scarpia isn't interested in that kind of bribe: he wants Tosca herself.
Spoletta returns with the news that Angelotti has killed himself upon discovery, and that everything is in place for Cavaradossi's execution. Scarpia hesitates to give the order, looking to Tosca, and despairingly she agrees to submit to him. He tells Spoletta to arrange a mock execution, both men repeating that it will be "as we did with Count Palmieri," and Spoletta exits.
Tosca insists that Scarpia must provide safe-conduct out of Rome for herself and Cavaradossi. He easily agrees to this and heads to his desk. While he's drafting the document, she quietly takes a knife from the supper table. Scarpia triumphantly strides toward Tosca. When he begins to embrace her, she stabs him, crying "this is Tosca's kiss!"  Once she's certain he's dead, she ruefully says "now I forgive him." She removes the safe-conduct from his pocket, lights candles in a gesture of piety, and places a crucifix on the body before leaving.
Scarpia