He has heard the song for the first time and decided to make notes after because there were many different types of tempos that changed quite frequently. After he made those notes he played it like he has played the song many times.
I think that he must have practised many years to learn how to play any songs by just listening to it a few times. Overall I think that he is very good at improvisation and this has helped him with playing the song