- how is that correct to use gerund after "to"?
It is a correct use of to because the preposition is indicating the second part of a TO PREFER this TO that
construction. It is a construction in which this and that stand for nouns, and in this situation, the nouns were gerunds (verbal nouns). In the sentence in the test, the construction was TO PREFER getting up early TO lazing in bed
. Perhaps you saw to followed by a verb form and you thought that the only standard verb usage would be the infinitive (to laze), as to lazing is not a standard verb form in English. If so, that was correct, in itself, but it led you down the wrong path.
- The right answer was "having been", why not just "being"?
The answer having been is correct because the action of the verb to be [unkind] is no longer taking place, at the time when the speaker is making the statement. If I say, "I am famous in Delaware for having been an unkind football coach in the state," then when the listener parses my statement, the listener learns that I am no longer being an unkind football coach in Delaware. On the other hand, if I were to say, "I am famous in Delaware for being an unkind football coach in the state," then my statement would be parsed to mean that I am, at the time I made that statement, still performing the action of being an unkind football coach in Delaware.
For whatever reason, the speaker is no longer continuing to be unkind—presumably, the speaker's mother is deceased.
There is also a clue within the internal logic of the sentence. If the speaker had said, I will always regret being unkind to my mother, the statement is problematic, because if the speaker's action was causing the speaker to feel regret, then the speaker would stop performing the action. That is, if the speaker knew that being unkind to Mother would ever be the cause of regret, then the speaker would cease being unkind to Mother.