Because you made the sentence for me, my mind and understanding of it are both clear.
Thanks to your sentence, I was able to understand it completely. Also, it cleared my mind.
ご質問ありがとうございます。
① "Because you made the sentence for me,"=「あなたが私のために作ってくれた文のおかげで」
"my mind and understanding of it are both clear."=「私の頭と理解はどっちもはっきりしました。」
② "Thanks to your sentence, "=「あなたの文のおかげで」
"I was able to understand it completely."=「完全に理解できました。」
"Also, it cleared my mind."=「そして、あたまがすっきりとしました。」
ご参考に。