I doubt that your study score will differ that much. Even if your teacher hates you, there are limited grounds in which she can be biased. For maths/science, a right answer is a right answer. Yes, she may take marks off for the most trivial "errors", but this won't affect your mark all that much, and would definitely not result in your study score dropping from 45 to 40 (hypothetically). In English, though it is somewhat more subjective than other subjects, there is a distinction between a good essay and a bad essay, and the teacher can't disciminate against you all that much (e.g. giving a clear 10/10 essay a 6/10 or something).
Overall, just do your best in your SACs and exams. If you have the potential, these influences won't, ultimately, be able to tie you down.
Also, on another note, rankings are relatively trivial. As attested in many cases throughout this forum, some students that aren't in the 1st and 2nd SAC rankings in their school still can get really, really, really good study scores.