A 21-year-old man has been jailed after he admitted causing a crash which killed his friend and seriously injured three other people.