How do I identify the scale/key of each solo?

I want to recognize (for example) the scale of quiet so I can improvise my own version but I have no idea. Thanks!