Usually we use こちらこそ、when the person that talked to you said something that you feel you should be the one saying so.
We use こちらこそ、in situations like:
ーいろいろありがとうございました。(Thank you very much for all)
ーこちらこそ、ありがとうございました。(Thank YOU very much) (I am the one that should be thanking you)
By the way こちらIs a polite way to say こっちwhich means here and こそis a word we use to
put emphasis on what you are saying.