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
After a sunny day rain will spoil things tomorrow
Saturday 27th August sees the Gateshead International Stadium host what could be the UK's biggest EVER sports day.
Stewart Anderson, 54, died in hospital following an incident outside the Loveshack nightclub in Durham in July.