The correct option is
D To write in her notebooks
The given sentence is a command.
In an imperative sentence, the verb of the reported speech takes 'to' i.e. to go, to do, etc. In the negative sentence the infinitive (to+ verb) is preceded by 'not'.
In the given sentence, the negative sense is provided by 'forbade'. So we need not use 'not' with the infinitive. Infinitive always takes the basic form of the verb preceded by to. So, 'write' will change into 'to write'. The first person pronoun 'my' will change into third person 'her'.
Thus, the complete sentence must be,
Rajni forbade her brother to write in her notebooks.
Thus option D is the correct answer.
Options A,B,C are incorrect as they do not follow the correct grammatical rules.