Two men have been jailed for a combined 48 years after an axe attack on a major road left a man with “near-fatal” injuries.