1. I spent two weeks in reading this book.
句中 this book是reading的宾语;reading this book是介词in 的宾语。in也可以省略,这样in reading this book 做spent 的宾语补足语。
2. Rex soon became an expert at opening the gate.
句中opening是动名词,因为在介词后面,必须具有名词性质,故动词名词化了。
前者 this book 直接做reading的宾语,这个句子中readingthis book 做宾语补足语;
你对概念理解错啦,动名词和现在分词是一回事,此处opening the door 做 at的宾语,at opening the door 做整句话的状语。