The oxidation number of Cr in ammonium dichromate is +6.
The oxidation number of Cr in chromium trioxide is +3.
The change in the oxidation number of one Cr atom is 3.
The overall change in the oxidation number for 2 Cr atoms is 6.
Hence, the n factor is 6.