The sentence is saying that the officer acted according to instructions.
The correct preposition to use after "in accordance" is "with," so the correct option is (4) "The officer acted in accordance with the instructions." This means that the officer followed the instructions as they were given.
is incorrect because "by" is not the correct preposition to use after "in accordance." is incorrect because "to" is also not the correct preposition to use after "in accordance." is incorrect because "of" is not the correct preposition to use after "in accordance."