I beat E3 and G2
but skipped F5
. Do I need to do F5 to unlock X? or is it just any of the 2?
F3 and G4 are rooted if that changes anything btw
A level that has n prerequisite levels (n≥1) gets unlocked either when you solve all of those levels or when you solve n-1 of them as well as all prerequisite levels of the one you don't. In this context, root is treated as normal solve.
In your case, since all are solved except F5, you'll need to solve both F1 and F4.