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
Things turn chilly as temperatures fall further.
Northumbria Police have released a CCTV image of a man they want to trace after a disabled teenager was verbally abused in Newcastle.
Lecturers from Newcastle, Durham, and York Universities have gone on strike today in a dispute over pensions