I had to think of a way of preventing him from following me 第二个of 怎么解释?

问题描述:

I had to think of a way of preventing him from following me 第二个of 怎么解释?
为什么不能用to呢? 不是我不得不想一个方法来阻止他跟着我吗?

可以的
the way of doing = the way to do