of what am I to be afraid ? = You don't know what to fear and you expect an answer from someone.
"When there is this type of danger what am I afraid of?" = You are asking yourself the question which would not make sense.
"...what am I to be afraid of" is more natural to me. "Of what am I to be afraid" sounds like someone trying to avoid ending a sentence with a preposition.