后者对.
从句中,特殊疑问词提前,之后是主语"the main idea of the material ",之后是动词(was)
I asked myself what the main idea of the material was,where this idea derived from and what can be utilized from that throught my reading.
补充:第一个what,换了其他特殊疑问词也是一样,什么where who的.后面的where是一样的,用陈述句语序(主语+动词+宾语).
而第二个what,由于这里what是做主语,所以不用改.你可以想,除了what,就找不到其他主语了,所以只能是what.
另外,感觉这样说使用于书面语多点,口语的话说起来都差不多,老外都懂,就看自己对自己的要求了.