If n is the total number of tests in the year, then n-2 is the number of tests before the two having scores of 100 each. The total of scores is found by multiplying the average score by the number of tests. So since the average was 84, the total of the scores was 84(n-2)=84n-168.
We need to add 2×100=200 to this score: 84n-168+200=84n+32, and we know the total score must be 86n:
84n+32=86n, 32=2n, so n=16 tests in the year.