This is called secondary referencing (e.g. if you are using a review article). First, we recommend that you try to locate and read the primary source – this will make it much easier to reference and will ensure you are not taking the quote/paraphrase out of context.
Situation A: you can’t find the primary source
You only reference the secondary source in your final list. You then refer to the primary source in your text, for example:
…according to Smith, as cited by Jones(11), most people recover…
Situation B: you can find both primary and secondary source
You reference both the primary and secondary sources in your reference list and cite them independently as you would any other reference.