A third man who testified against his codefendants in a 2021 fatal robbery was sentenced to five years in prison.