Three men who called themselves the three musketeers chased down a man walking his dog before he was stabbed to death in a street, a court has heard.