"He desires to go away."
Translation:Hij verlangt ernaar om weg te gaan.
The hint suggests "weggaan", can that not be used for this sentence?
There are certain verbs -- phrasal verbs that are accompanied by a preposition. These prepositions require an object -- and when the rest of the clause does not provide it with an object, it is necessary to use er, daar or hier and construct a pronominal adverb.
Here's a list of common verbs with prepositions (Phrasal Verbs): List
- "We hebben ernaar gestreefd ||| (om) alle zwerfkatten een huis te geven." -- "We have tried (aimed) to give all straycats a home."
In the example above the ||| divides the two subclauses. Note that the first clause includes a phrasal verb: streven naar (to aim for). The clause We hebben ernaar gestreefd does not include an object for naar, thus a pronominal het, which becomes er when attached to naar, is necessary to fulfill the need for naar to have an object.
The om can be omitted but it's worth noting its presence, as it begins the subclause -- thus triggering the need for a te + infinitive construction to follow at the end.