A driver who almost killed his passenger when his speeding car hit a wall and erupted into a ball of flames has been jailed for more than two years.