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
Proposals for the sea defence scheme at the Central Lower Promenade in Whitley Bay will help protect homes & businesses.
Protestors will head to County Hall on Friday to protest against the proposals for a retail park and 200 houses on the outskirts of Morpeth.
The two cities have been awarded a combined £393,400 to develop technology to help make motoring easier in the region