A driver, who had taken nitrous oxide minutes before a crash which caused the death of a teenager, has been jailed.