so the first example was a gerund right?
why does the second one need de, is it also a gerund?
I have no idea about the terminology. I learned a little French with a method called "Assimil" (virtually no grammar; just a snowball effect of your vocabulary from submerging yourself into the sound of the language in action) and have learned to GUESS the meaning from the sound only. If I am in doubt about the meaning, I just use Google translate to verify.
The usage of "de" is more related to the FIRST verb than to the infinitive following it.
P.S.: The French tend to use either "a" or "de" after certain verbs before adding an infinitive, but I have no idea if any strict rules exist. It has something to do with the second verb being the direct object of the first, but I think the French themselves do that more or less automatically. Grammar for the Roman languages is quite complicated actually. I would concentrate more on the music in the language if I were you and translate with corresponding "melodies" from your native language. Labeling everything grammatically will hardly be of any help.