The ACCA suggest that the exams are taken in number order, which is very sensible.
However, since F5 is 50% calculations (and 50% written), many people prefer to take it with a paper that is 100% written – in which case it means either F4 (law) or F8 (auditing).
Do not take F9 at the same time as F5. Many people seem to think they are similar (because the name is similar), but in fact they are very different and studying for both at the same time can be very confusing.