A student who made a U-turn after quitting sixth form has won a place at university and a degree apprenticeship with Amazon.