That has nothing to do with scales, he's using dissonant notes to embellish chord tones.
Quote by nasserliverpool
How would you recommend me to learn to play like that?

if your serious about jazz...this will take some time to absorbe-listen to jazz players!

learn diatonic harmony -- in all 12 keys
the chords (and inversions) scales, arpeggios for each degree in all positions,

then the application of the harmony: standards
you will find many examples of how chords relate to each other in the songs of cole porter and gershwin..most are fairly easy..but harmonically rich..and form the basis for many song writers that followed..(lennon/mcartney, paul simon, billy joel, freddy mercury..to name a few)

read some harmony texts

find some musicians that play/know jazz you can jam with..this is important..you learn alot from more advanced players..

play well

If I was playing that first lick I would think of it as being in the 'blues scale', which to me means major/minor pentatonic (depending on context, often both at once) with whatever accidentals I feel would sound cool. It's not so scientific and if you're looking at jazz you wanna pay attention to the chord tones more than anything.
But boys will be boys and girls have those eyes
that'll cut you to ribbons, sometimes
and all you can do is just wait by the moon
and bleed if it's what she says you ought to do