The first example is a classic "split infinitive" faux pas. The most famous example of this error is the Star Trek line, "to boldly go". You are counselled NOT to put anything in the middle of the infinitive (to discuss). It happens all the time, however, and to do so - although it is wrong - will not identify you as a non-native speaker. Sometimes, the reconstruction is too awkward to be worth the effort, and it loses its poetic punch. Can you imagine the StarTrek line reading, "to go boldly" or "boldly to go"? Hardly.
Your use in the second example is not an infinitive but rather a prepositional use of "to" and your insertion there is quite acceptable, in my book at least.
Student or Learner