To begin with, I don't think there is any significant difference between the use of "the way" and "in the way". It is matter of what is usually spoken or written. Speaking in the context of the sentences provided, we use "the way" to mean a particular method or style of doing something. Gramattically, it is also OK if we use "in the way" instead. But "in" is optional and it does sound natural here. Also, its use is seldom heard in this sense. On the other hand, "in the way" is an idiomatic phrase that is used for things obstructing a path/space or stopping us from moving forward. A few examples of the use of both "the way" and "in the way" are given below: * I hate the way he treats his wife. * He didn't like the way I did this work. * You did it (in) the wrong way. * There is a rock in the way. * I could not see him because there was a big crowd in the way. So we had better not use "in the way" in the sense "the way" is used in order to avoid any confusion.