To get back in good standing it takes roughly 3 months per tier, assuming that you play the average amount of games.
Since you are asking about to not be in ban range, Theoretically to not be in ban range for slightly but constant toxic behavior, it takes 3 months of POSITIVE interactions. You need to go beyond the average of neutral and be a positive member.
This part is not fact but something from watching some interactions with reds and banned members on the boards. The system and Riot are less likely to be forgiving since you have been to the 2 week ban point. At this point you should know better, or have learned your lesson. If you go back to a behavior that riot deems not acceptable and it looks like you are playing with the system; Riot will be more aggressive with your punishments verus someone else.
Your counter may go back down, but Riot tracks how many punishments you have gotten. You tripped a point that very few do, watch how you act.
i am not going to bother with the AFK argument, since odds are you triggered leave buster with more AFKs than you think.