How would you say I explained why...
I want to say ''I explained why I tried to open her door" would it be something like "ich habe erklärt warum ich ihre Tür zu öffnen versucht habe"?
All words are correct, but this word order is better:
Ich habe erklärt, warum ich versucht habe, ihre Tür zu öffnen.
(The commas might be superfluous nowadays, in my school days they were mandatory)
The first is mandatory, the second is optional, I think, but I would anyway put it because it's closer to the natural flow of speech. There are other examples of sentences with zu + inf. or um zu + inf. that sound/read better without it, to me at least.