Within the same level you can give an exam in any order. So F8 and F7 come under the Advanced Skill level…hence can do either before the other. I hope this part is clear.
But if you’re concerned about any relation between the syllabus of the two then as far as I know, F8 and F7 are not linked.