I had somewhat of the same dilemma. I was with a school that had basic classes and I wanted to switch to another that had even better and more challenging classes.
The school that you are wanting to switch back to should rank you, but your spot may be lower than 1 out of 500.
I don't think that schools have a form of make up classes, but I'm pretty sure that they would want to see their students succeed and would do whatever possible to accomplish that. Example: Letting a student catch back up on their own, while attending the current pace at which the others are at. Ex: Allowing the student to stay later after school as a way of assistance to get back on track. Etc.
About the AP classes, I'm not sure about the policies on that for the school you're switching to, but I do know that there is usually a "cut-off" date for those who are wanting to change an AP class for another AP class and those who just want to take an AP class.
Also, keep in mind that your old school will be receiving a transcript of what you have done so far at you're current school, so that may affect things (classes) too.
I think if you explain your situation and determination for wanting to get back on track, they will try to help you in any way possible.
Good luck!