Your raw internal marks (report marks, etc) do not contribute towards your final internal marks (the ones used to generate your HSC marks) at all.
It is only the ranking that is determined from your raw internal marks that affects your final internal mark. If you come first internally, you will take the highest external mark as your internal mark no matter what.
Your friend must come 1st overall in the grade (and hopefully receive a 97~ scaled in the exam).
The exception to this case is if your friend does not rank first internally, but your school's ADV English cohort is so strong that somehow multiple people are able to receive 97~ final marks - in which case multiple people can state rank.
I probably did not explain that very clearly, but your friend just needs to come first internally and then absolutely ace the HSC exam (she's allowed to lose around 6 marks MAX - but that does change yearly based on a variety of factors - i.e. difficulty of the exam and strength of the general cohort).
Hypothetically speaking, your friend could get 5/100 for her raw internal marks but rank first overall and then absolutely ace the HSC exam and state rank.