#To whom did Moses give the words of the law in a book when he had finished writing?

Moses gave the words of the law to the Levites who carried the ark of the testimony of Yahweh. [31:24-25]

#What did Moses tell the Levites that they should do with the book of the law when he finished writing it?

Moses told the Levites to take the book of the law and put is by the side of the ark of the testimony of Yahweh their God so that it would be there as a witness against them. [31:25-26]