As a rule, gerunds should be used like their verbal counterparts. If the verb is a phrasal verb, then the gerund should be constructed accordingly.
So your example "Thinking of you makes me happy" is correct, because you'd use "of" if you rephrased this with "think" as a verb:
When I think of you, it makes me happy.
However, this is incorrect
He has finished washing of the dishes.
because you'd say "I don't want to wash the dishes," not "I don't want to wash of the dishes." That last sentence makes no sense in English.
The Inevitable and Rarely Used Exception
You knew there was going to be an exception, right?
In a few cases, using the gerund + of is correct when it is important to emphasize the specific act the gerund describes. It also sounds extremely formal to an English speaker; it is not a construction one would use in everyday speech except as a joke.
Because this construction refers to a definite act, it must take the definite article "the." The phrase "She enjoys reading of poems" would sound odd to an English speaker, but "She enjoys the reading of poems" is perfectly correct, though having an elevated tone.
And because "the reading of poems" draws attention to the act and not the person performing the act, it can imply the reading of poems by others in addition to her own reading of poems.
A few more examples:
The signing of the Declaration of Independence actually took place on July 2.
The naming of new Nobel Prize laureates is always exciting.
I love the turning of the seasons.
Notice how the use of "the" refers to a specific act or event. The sentence
Signing the Declaration of Independence actually took place on July 2.
does not make sense because without "the," it implies a habitual action, not a specific act or event.
Humorous use of this construction usually makes an insignificant event sound more important than it really is:
Now is the time for the washing of dishes.
I humbly invite you to join me in the drinking of beer.
You would have to choose #1 , because #2 contains the diparaged construction "the reason why".
However, neither #1 nor #2 is a good rephrasing of the incorrect example.
For one thing, "what is the reason" was changed to "is this the reason", which changes the meaning.
For another thing, "neglecting doing" is awkward. Of course, simply taking out "doing", as user8399 suggests, changes the meaning. "Neglecting to do..." would be better.
For another, If you treat "neglecting" as a noun, it should be your neglecting. . . " rather than you neglecting. . ."
So really, the correct answer is that neither #1 nor #2 is a good rephrasing.
Feel free to tell your teacher this; and that the question should be thrown out (not counted), because it was so badly written; and that you deserve extra credit for this analysis, not a downcheck for whichever answer you chose.
Best Answer
It's idiomatic. Either of these two forms are commonly used:
or
In the first case, "doing my homework" is the task. In the second case, "homework" is the task. It depends on whether you regard 'homework' as a concrete noun - a collection of papers to be worked with in some way - or as an abstract noun - an assignment to be accomplished.