The court heard that James Allen told a friend that he was dying of cancer on the night of one of the murders.
A friend of James Allen said that he took pity on him, and offered him somewhere to stay the night.
Allen is accused of murdering a pensioner in Middlesbrough last April, as well as a woman in Whitby.
The trial continues.
More top news
A look ahead at the forecast for the Tyne Tees region.
A pair of seals have been released back into the wild after spending a week at the Tynemouth Blue Reef Aquarium.
The Ed's Diner customer was left a little green after discovering he was sharing his meal with something that was not on the menu.