James Donoghue lashed out at fellow con Duncan Stammers while he was in the grip of "prison paranoia," the court heard.