Study the information about to and preposition + -ing.
 
1. Compare: afraid to and afraid of doing.
 
I am afraid to do something = I don’t want to do it because it is dangerous or the result could be bad.
 
People are afraid to walk here.
 
Jane was afraid to tell her parents about a bad mark.

I am afraid of something happening = it is possible that something bad will happen.

The path was icy, so they walked carefully. They were afraid of falling.
  
Icy_path_off_Gathurst_Road_-_geograph.org.uk_-_1635001.jpg
 
2. Interested in doing and interested to do.

I am interested in doing something = I am thinking of doing it, I would like to do it.

I tried to sell my car, but nobody was interested in buying it.
  
sell.png

We use interested to when we want to say how somebody reacts to what they hear/see/read/know/find/learn.
  
I would be interested to know what he thinks.
  
3. Sorry to do and sorry for/about doing

Sorry to is used when we regret something that happens.

I was sorry to hear that Sam lost his passport.

Sorry to can be used when we apologise at the time we do something.

I am sorry to phone you so late, but I need your help.
  
phone2.png

Sorry for/sorry about doing something to apologise for something you did before.

He is sorry for shouting at you last time.

4. Remember these structures:

Want to do
Fail to do
Allow somebody to do
Think of doing
Succeed in doing
Prevent somebody from doing
Stop somebody from doing