How to use a summary of a paper that references to another paper?
To comment on the options you present (my comments in bold):


  
  Use the A summary of B and cite to A. (Don't do this)
  Use the A summary of B and cite to B. (This would generally be poor form; you want to verify the accuracy of the summary and ideally form your own understanding; in extreme cases it could be plagiarism; that said if you are merely using the summary to assist a little in your interpretation, this might be okay.)
  Write my own summary of B and cite B. (This is generally preferable)
  


When the particular interpretation of A is relevant, another option is to write something like:


  Alpha (2015) interprets the work of Beta (2013) to mean that ...


In general, the aim is to give credit to intellectual contribution. So if someone does a study or writes a paper, cite the primary source. If you want to summarise what it means cite the primary source.