Since he didn't speak before dying in "Time and the Rani", and we didn't see his adventures between "The Trial of a Time Lord" and that story, his final on screen words were "Carrot juice! Carrot juice! Carrot juice!" As "Terror of the Vervoids" takes place further down his timeline though, it would make his last chronological on-screen words "Vesti la giubba e la faccia infarina." (a reference to the classic opera "Pagliacci") In the "Time and the Rani" (novelisation) his final words were "Take a look at the computer read-out screen". However, "Spiral Scratch" (novel) tells us it's "Local… tractor beam…" Finally, "The Brink of Death" (Big Finish audio story) has it as "I've had a good innings... All those lives I've lived. I hope the footprint I leave will be light, but apposite... Who said that? Who is that? Who's there...?"