The correct answer is C. The librarian said that you had not returned your book yesterday.
The librarian is addressing the reader directly, using the second person pronoun “you.” This means that the librarian is saying that the reader did not return the book, not that the librarian did not return the book.
A is incorrect because the librarian is not talking about himself, but about the reader.
B is incorrect because the librarian is not saying that the book has not been returned, but that the reader has not returned the book.
D is incorrect because the librarian is not talking about himself, but about the reader.