The correct option is A To do the right thing
'To hit the right nail on the head' means to do or say exactly the right thing. E.g. He is very good at debugging. Every time you go to him with broken code, he will hit the right nail on the head and tell you the exact problem with the solution. Thus, option A is the correct answer. Rest of the options are incorrect.