Play Riff A again after you play Riff B, then play this:
|------------------------------------------|
|----------------------------------------3-|
|----------------------------------------2-| Play once
|----------------------------------------0-|
|-0--0---X-X-0h3-3--0h3-3--0h3-3--0h3-3--0-|
|-0--0---X-X-0h3-3--0h3-3--0h3-3--0h3-3--0-|
|------------------|
|------------------|
|------------------| Play once
|------------------|
|-0-0--0-2h3-2h3-0-|
|-0-0--0-2h3-2h3-0-|
Play this after the solo:
|-------------------------------|
|-------------------------------|
|-------------------------------|
|-------------------------------|
|---------------------------1-1-|
|-3p0-0-0-5p0-0-0-6h0-0-0-0-1-1-|
^ ^ ^ ^ ^ ^ ^
After this, play Riff B 4x, and during it, play this:
|-------------------|
|-------------------| (Octaves)
|-7-7-7-10-10-10/12-| Play 4x with Riff B
|-------------------|
|-5-5-5/-8--8--8/10-|
|-------------------|