Two men have received lengthy prison sentences for the attempted murder of an 18-year-old man who shot and repeatedly stabbed in the back of a taxi.