GIVE ANSWERS - English

Vota ara!Sense resposta
Which is correct: ”take the trouble to V” or ”take the trouble of V-ing”?