That is in fact a stretch but perhaps not impossible - even for small hands.
One thing you must be sure you are doing is correctly positioning your fretting hand on the neck for that type progression involving a maximum stretch. You will probably find it easier to make the stretch if you position your thumb near the center of the back of the neck and shift it closer to the body of the guitar so that when you are playing the 7th fret on the A string your thumb is actually under the 8th or 9th fret. This will cause your hand to pivot or rotate in the direction of the distant 12th fret and make it easier to reach with your pinkie (yes you will have to use your pinkie).
To help develop more flexibility you can do some simple stretching exercises that you can do before every practice session. Here is a good video on YouTube that has been highly rated and will give you some ideas about a safe stretching routine. Be sure you warm up the muscles in your hands before you stretch.
After doing some warm up exercises and going through your stretching routine, you should practice playing the intro riff. Until you improve your flexibility it might be all you can do to reach the 9 - 12 fret stretch. But it should become easier over time. It might take weeks of intentional stretching prior to every practice session before you see noticeable gains. Be patient.
Once you are able to make the stretch more comfortably - practice playing the riff - starting at a tempo that allows you to play it fluidly with the correct timing between notes. Gradually speed up the tempo as you master the riff at each successive speed.
The good news is, if you use a desire to play this riff on the A and D string as a goal, and work towards accomplishing it - your efforts will be rewarded with an ability to play many more riffs with similar stretches.
On the other hand, if after doing your best to increase your flexibility and ability to make the stretch - you still come up short (no pun intended), you might have to find a different place on the fretboard to play the riff where the stretch is not quite so great (as Dom suggested in his excellent answer).
But I believe you will be able to master the stretch - and in so doing - open up a world of other riffs you will be able to do.
Good luck improving your skills. It's a journey that never ends - enjoy the journey!