The octet rule signifies towards the capability of the atoms to prefer to exhibit eight electrons in the valence shell. In case, when the atoms possess lesser than eight electrons, they seem to react and produce more stable components. While discussing octet rule, one does not consider d or f electrons.
According to the octet rule, the atoms of the prime-group elements seem to bind in such a manner that each atom exhibit eight electrons in its valence shell, providing it the similar electronic configuration as a noble gas.
In the given question, in BrF3, fluorine follows octet rule, while bromine does not follow the octet rule.