do the trick vs hit the spot

do the trick

verb
  • To work; to be successful; to solve a problem; to be sufficient or adequate to fulfill a purpose. 

hit the spot

verb
  • To be particularly pleasing or appropriate; to be just right. 

How often have the words do the trick and hit the spot occurred in a corpus of books? (source: Google Ngram Viewer )