To-infinitiveafter verbs such as know, decide, ask, learn, remember, want to know, etc., when they are followed by question words (who, what, where, how, etc.). "Why' is followed by a subject + verb, not by an infinitive.e.g. I can't decide where to go. I want to know why you've decided to leave.
To-infinitiveafter adjectives such as nice, sorry, glad, happy, afraid, ashamed, etc. e.g. He is glad to be back.after too and enough.e.g. She's too shy to talk to the manager. We've got enough money to buy a new car.after it + be + adjective (+ of + noun/pronoun). e.g. It was nice of him to help.