GIVE ANSWERS - English

Қазір дауыс бер!Жауапсыз
Which is correct: ”take the trouble to V” or ”take the trouble of V-ing”?