GIVE ANSWERS - English

Rösta nu!Obesvarad
Which is correct: ”take the trouble to V” or ”take the trouble of V-ing”?