College admission why my rank dropped (2 to 31) and my GPA dropped from 4.0+ to 3.7 change of school

As a freshman at Glenbard South High School, I was a valedictorian. I was among 250 gifted freshmen who love mathematics and science, invited to attend the most selective residential high school Illinois Mathematics and Science Academy”, Aurora. As Junior, I tripled in science, studying advanced curriculum in Organic Chemistry”, Planetary Science”, Microbes and Disease”, Scientific Investigation and Research”, BC Calculus”, Ancient World Religion and Philosophy”, Literary Explorations III”. As sophomore I learned advanced scientific concepts in Evolution, Biodiversity and Ecologya?, a?Scientific Inquiries Chemistry”, .Scientific Inquiries Physics”, a?Methods in Scientific Inquirya?, a?Mathematical Investigations III & IVa?. IMSA classes are rigorous college preparatory courses (AP), with all classes being taught at the honors level. Unfortunately, I needed to transfer to my home school on Dec 5 2012, 5 days before the completion of first semester of junior year at IMSA due to health reasons. IMSA did not give credit for the rigorous college preparatory courses, since I did not complete the semester, according to their policy. Glenbard South could not transfer credits for courses taken at IMSA during 3 months (Aug -Dec). To get credit for the first semester, I had to study the syllabus taught at Glenbard South on my own in 3 weeksa time before the finals were scheduled. I completed first semester syllabus in AP Calculus BC, AP Chemistry, AP English Literature and Composition in record 3 weeksa time. Self-study, limited time and difficulty of curriculum limited my scoring in the subjects to B+. This impacted my GPA such that I dropped from rank 3 to rank 31 in a batch of 317 students.
To make the matter worst, my home school did not have the equivalent advanced curriculum course titles to match courses taken at IMSA in sophomore year, for example .Methods in Scientific Inquiry. (Honors) course at IMSA was translated as a?Environmental Sciencea? (non-honors) in Glenbard South, or American Studies(Honors) at IMSA is translated as a?US Historya? (non-honors) in Glenbard South, this further impacted my GPA. My class rank and GPA calculated is not the appropriate reflection of Honors Course Curriculum, I have taken at IMSA. However, I derive satisfaction from the fact that I secured admission in one of the most competitive public high school and studied advanced curriculum that helped me prepare for the college.