To illustrate how referencing the 10 Commandments as recorded in the Torah can be called either "the book of the law" or the "10 Commandments", or even "the words of Moses" I will present another image...
The image blow is of the Torah. This Torah is opened to the passage containing the Aseret ha-Dibrot (10 Commandments).
Are we looking at the "book of the law" ("words of Moses") or are we looking at the "10 Commandments"?
Answer key:
A.) We are looking at the Torah ("book of the law" or "words of Moses")
B.) We are looking at the Aseret ha-Dibrot (the 10 Commandments)
Which one is it? A or B?
In this instance, all of the above would be correct.