Turn the trick

To bring about the result that one wants, to succeed in what one plans to do.

“That will turn the trick,” I said as my friend found the correct tool to fix the kitchen sink.