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
Read our football blog with Robert Nichols after Middlesbrough's home defeat to Tottenham Spurs.
Emma brings you Sunday's weather forecast for the Tyne Tees region
Speaking after Sunderland's 3-2 defeat, Moyes said: "It can't always be me leading them by the hand and showing them what they should do".