In The Waters of Mars, after the rocket explodes, the Doctor stands there remembering words he said before:
DOCTOR [memory]: I'm not just a Time Lord, I'm the Last of the Time Lords. They'll never come back. Not now. I've got a Tardis. Same old life, last of the Time Lords. And they died and took it all with them. The walls of reality closed, the worlds were sealed, gone for ever. The Time Lords kept their eye on everything. It's gone now. But they died, the Time Lords! All of them, they died. I'm the last of the Time Lords.
Then he went back into the base and said:
DOCTOR: Yes, because there are laws. There are Laws of Time. Once upon a time there were people in charge of those laws, but they died. They all died. Do you know who that leaves? Me! It's taken me all these years to realise the Laws of Time are mine, and they will obey me! and also we're fighting time itself. And I'm going to win!
What exactly was he remembering where he said these things? And what made him go back to the base after leaving?