They step out into a junkyard. The Doctor says that the yard is full of Rift energy and the TARDIS will refuel itself if left to its own devices.
Idris runs over to them, shouting "thief" at the Doctor. She kisses him and then bites him. She is followed by Auntie, Uncle, and Nephew. They try to make excuses for Idris, intimating that she is mad. The Doctor is pleased to see an Ood and notices that it is mute because its communication sphere is broken. When the Doctor fixes the sphere it plays several distress messages from various Time Lords. The Doctor is optimistic that there are other Time Lords alive nearby. Idris collapses and Nephew carries her into a cage. Auntie and Uncle invite the Doctor to speak to the House.
The House is the name they give to the sentient part of the asteroid. House provides for Auntie, Uncle, Nephew, and Idris while they serve him in return. The Doctor tells House that he is the last of the Time Lords and his TARDIS is the last in existence. The Doctor sends his Amy and Rory back to the TARDIS to get his sonic screwdriver, which he actually has with him. He uses it to lock the doors of the TARDIS when Amy and Rory are inside. He traces the Time Lord voices to a cupboard where he finds dozens of hypercubes, transmitting distress signals from Time Lords long dead. The hypercube from the Corsair was sent to lure the Doctor to the asteroid. The Doctor has already noted that House has been "repairing" Auntie and Uncle with body parts from the Time Lords who have landed here. Auntie has one of the Corsair's arms, for example. The Doctor tells them to run.
In the TARDIS, Amy and Rory realise that they are locked in and the TARDIS is surrounded by a cloud of green gas.
The Doctor finds Idris. She has predicted that the Doctor will be upset about the hypercubes ("the little boxes") and he asks how she could know this. She tells him that she is the TARDIS, implanted in Idris's body. To convince him of the truth of this she tells him that she left her door unlocked so that he would steal her because she wanted to see the universe. Far from him stealing her (or borrowing as he would have it) she "borrowed" him. He uses his sonic screwdriver to release her from the cage. She tells him that House eats TARDISes. Because that would blow a hole in the universe, the House has to remove the matrix and place it in a body that will die because of the incompatible energy. Idris thus has minutes to live.
The Doctor rushes off to the TARDIS, trying to free Amy and Rory before the TARDIS is eaten. The TARDIS doors remain locked and Amy and Rory cannot escape. House takes control of the TARDIS, dematerialising it heading off towards the bigger universe in search of food. House reveals his plans to Amy and Rory and asks them why he shouldn't kill them immediately. Rory suggests that House needs entertainment and they can provide that for it. House orders them to run and they do so.
Auntie and Uncle drop dead once House has gone. Idris says that she only has eighteen minutes to live and the asteroid will be over in three hours. The Doctor looks around at all the junk and realises that it is all made up of half-eaten TARDISes, their chameleon circuits intact and operative. They decide to reconstruct a TARDIS console from these remnants.
Amy and Rory find themselves victims of House's games. It slams corridor bulkhead doors to separate them, putting Rory into a faster time stream than Amy so that he ages and dies in minutes, then revealing all of this as an illusion in Amy's mind. Rory and Amy eventually come back together.
The Doctor and Idris converse while building the new TARDIS. The Doctor says that she never takes him where he wanted to go but she says that she took him where he needed to go. They complete the console and Idris fuels it with her TARDIS energy. They chase the TARDIS through the vortex. The Doctor tells Idris to send Amy a telepathic message to lower the shields so that they can get on board. Idris asks if Amy is "the pretty one" and sends Rory the message instead. She directs them to a previous console room which House does not know exists.
The couple flees from Nephew, who House has sent after them. They get to the doors, which are locked, and Idris sends Rory another telepathic message to give him the password. Amy mentally visualizes the code to allow them entry and they lower the shields. Nephew follows them inside but is vapourised when the Doctor and Idris arrive in the new console. The Doctor tells Amy and Rory that Idris is the embodiment of the TARDIS. Amy asks if he has been wishing very hard. The Doctor sees that Idris is dying and has to act fast. He makes a pact with House, saying that if the entity promises to keep them alive he will tell it how to break across into the Universe. House agrees and the Doctor tells it to delete 30% of the TARDIS rooms for extra fuel. The House promptly starts with the old console room, intending to kill them all.
They all reappear in the main control room. The Doctor reveals the emergency failsafe of the TARDIS is to transfer all living things in deleted rooms to the main control room. House decides to kill them all there and then and the Doctor and Amy give it a round of applause. This is to buy some time while Idris dies and the matrix leaves her body in golden vapour. House's plan was to trap the matrix in a body where it could die safely away from the control room but now the matrix has been released into the console room. The matrix quickly overpowers House and assumes control of the ship, presumably removing the evil entity in the process.
The matrix projects an image of Idris to have a final conversation with the Doctor, saying how glad she is after seven hundred years to have talked with him. She also says the one thing she never got to say to him, "Hello." The Doctor doesn't want her to go but she does, saying "I love you."
The Doctor is underneath the console putting a firewall around the matrix. Rory tells the Doctor that Idris whispered, "The only water in the forest is the river," before she died. She said they would need to know this one day. The Doctor tells Amy and Rory that he is configuring a new bedroom for them. They ask not to have bunk beds this time. After they have gone the Doctor speaks to the console and tells her to take them somewhere restful, perhaps the Eye of Orion. One of the levers moves by itself and the Doctor dances around in delight.