The solo must be in your head.
Then i sit and listen and repeat little peaces of the solo.
You also can record the solo on the computer and select a piece of the solo and play in in a loop and play along.
In the beginning it takes awhile but after doing this over and over it gets easier. For the chords in the song you first must find out the bass notes, if you got them you can try differenet chords that match the bassnotes. For me the chors are then hardest parts. The solo is just listening over and over.